]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - win/inspircd_win32wrapper.h
m_spanningtree Remove unneeded #includes
[user/henk/code/inspircd.git] / win / inspircd_win32wrapper.h
index 1f9936caf20e5f5d033cb57c8609376621fd2212..9b18715cda57a92ab3a622fa41e89e5473f7dcf6 100644 (file)
  */
 
 
+#pragma once
+
 /* Windows Port
    Wrapper Functions/Definitions
    By Burlex */
-
-#ifndef INSPIRCD_WIN32WRAPPER_H
-#define INSPIRCD_WIN32WRAPPER_H
-
 /*
  * Starting with PSAPI version 2 for Windows 7 and Windows Server 2008 R2, this function is defined as K32GetProcessMemoryInfo in Psapi.h and exported
  * in Kernel32.lib and Kernel32.dll. However, you should always call this function as GetProcessMemoryInfo. To ensure correct resolution of symbols
@@ -106,9 +104,6 @@ __inline int inet_aton(const char *cp, struct in_addr *addr)
        return (addr->s_addr == INADDR_NONE) ? 0 : 1;
 };
 
-/* Handles colors in printf */
-int printf_c(const char * format, ...);
-
 /* getopt() wrapper */
 #define no_argument            0
 #define required_argument      1
@@ -189,5 +184,17 @@ void ::operator delete(void * ptr);
 
 #define DISABLE_WRITEV
 
-#endif
+#include <exception>
 
+class CWin32Exception : public std::exception
+{
+public:
+       CWin32Exception();
+       CWin32Exception(const CWin32Exception& other);
+       virtual const char* what() const throw();
+       DWORD GetErrorCode();
+
+private:
+       char szErrorString[500];
+       DWORD dwErrorCode;
+};