Home | History | Annotate | Download | only in Windows
      1 // Windows/Error.h
      2 
      3 #ifndef __WINDOWS_ERROR_H
      4 #define __WINDOWS_ERROR_H
      5 
      6 #include "Common/MyString.h"
      7 
      8 namespace NWindows {
      9 namespace NError {
     10 
     11 bool MyFormatMessage(DWORD messageID, CSysString &message);
     12 inline CSysString MyFormatMessage(DWORD messageID)
     13 {
     14   CSysString message;
     15   MyFormatMessage(messageID, message);
     16   return message;
     17 }
     18 #ifdef _UNICODE
     19 inline UString MyFormatMessageW(DWORD messageID)
     20   { return MyFormatMessage(messageID); }
     21 #else
     22 bool MyFormatMessage(DWORD messageID, UString &message);
     23 inline UString MyFormatMessageW(DWORD messageID)
     24 {
     25   UString message;
     26   MyFormatMessage(messageID, message);
     27   return message;
     28 }
     29 #endif
     30 
     31 }}
     32 
     33 #endif
     34