summaryrefslogtreecommitdiffstats
path: root/CPP/Windows/Error.h
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/Windows/Error.h')
-rwxr-xr-xCPP/Windows/Error.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/CPP/Windows/Error.h b/CPP/Windows/Error.h
new file mode 100755
index 0000000..d916e8e
--- /dev/null
+++ b/CPP/Windows/Error.h
@@ -0,0 +1,33 @@
+// Windows/Error.h
+
+#ifndef __WINDOWS_ERROR_H
+#define __WINDOWS_ERROR_H
+
+#include "Common/MyString.h"
+
+namespace NWindows {
+namespace NError {
+
+bool MyFormatMessage(DWORD messageID, CSysString &message);
+inline CSysString MyFormatMessage(DWORD messageID)
+{
+ CSysString message;
+ MyFormatMessage(messageID, message);
+ return message;
+}
+#ifdef _UNICODE
+inline UString MyFormatMessageW(DWORD messageID)
+ { return MyFormatMessage(messageID); }
+#else
+bool MyFormatMessage(DWORD messageID, UString &message);
+inline UString MyFormatMessageW(DWORD messageID)
+{
+ UString message;
+ MyFormatMessage(messageID, message);
+ return message;
+}
+#endif
+
+}}
+
+#endif