]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - win/inspircd_win32wrapper.h
now works 'enough' to progress further. Can start and stop the service and it accepts...
[user/henk/code/inspircd.git] / win / inspircd_win32wrapper.h
index 7fef5ff1dd2972729c66a40114c5cdb2dbcb3430..94f799c189829a7a8912b7e7dbb2fc4bb12d8ca9 100644 (file)
@@ -24,7 +24,7 @@
 #define ENABLE_CRASHDUMPS 0
 
 /* This defaults to 64, way too small for an ircd! */
-#define FD_SETSIZE 12000
+#define FD_SETSIZE 24000
 
 /* Make builds smaller, leaner and faster */
 #define VC_EXTRALEAN
@@ -55,6 +55,9 @@
 #define DllExport __declspec(dllimport)
 #endif
 
+/* Redirect main() through a different method in win32service.cpp, to intercept service startup */
+#define ENTRYPOINT CoreExport int smain(int argc, char** argv)
+
 /* Disable the deprecation warnings.. it spams :P */
 #define _CRT_SECURE_NO_DEPRECATE
 #define _SCL_SECURE_NO_DEPRECATE
@@ -175,6 +178,8 @@ CoreExport int gettimeofday(struct timeval * tv, void * tz);
 #pragma warning(disable:4312)          // warning C4312: 'type cast' : conversion from 'int' to 'HANDLE' of greater size
 #pragma warning(disable:4355)          // warning C4355: 'this' : used in base member initializer list
 #pragma warning(disable:4996)          // warning C4996: 'std::_Traits_helper::move_s' was declared deprecated
+#pragma warning(disable:4706)          // warning C4706: assignment within conditional expression
+#pragma warning(disable:4201)          // mmsystem.h generates this warning
 
 /* Mehhhh... typedefs. */
 
@@ -193,30 +198,24 @@ class InspIRCd;
 class ValueItem;
 class ServerConfig;
 
-class IPC
-{
- private:
-       InspIRCd* Instance;
-       HANDLE hIPCPipe;
- public:
-       IPC(InspIRCd* Srv);
-       void Check();
-       ~IPC();
-};
-
 /* Look up the nameserver in use from the registry on windows */
-std::string FindNameServerWin();
+CoreExport std::string FindNameServerWin();
 
 /* Clear a windows console */
-void ClearConsole();
+CoreExport void ClearConsole();
+
+CoreExport DWORD WindowsForkStart(InspIRCd* Instance);
+
+CoreExport void WindowsForkKillOwner(InspIRCd* Instance);
 
-DWORD WindowsForkStart(InspIRCd* Instance);
+CoreExport void ChangeWindowsSpecificPointers(InspIRCd* Instance);
 
-void WindowsForkKillOwner(InspIRCd* Instance);
+CoreExport bool ValidateWindowsDnsServer(ServerConfig* conf, const char* tag, const char* value, ValueItem &data);
 
-void ChangeWindowsSpecificPointers(InspIRCd* Instance);
+CoreExport bool initwmi();
+CoreExport void donewmi();
+CoreExport int getcpu();
 
-bool ValidateWindowsDnsServer(ServerConfig* conf, const char* tag, const char* value, ValueItem &data);
 
 #endif