Displaying 5 results from an estimated 5 matches for "service_table_entry".
2013 Aug 29
5
[PATCH 1/6] Rationalise whitespace to 4 space indentation with no trailing spaces
...*a_argv)
-{ 
+{
     /* For compatibility with MinGW, see:
-	http://demosten-eng.blogspot.com/2008/08/mingw-and-unicode-support.html */
+    http://demosten-eng.blogspot.com/2008/08/mingw-and-unicode-support.html */
     TCHAR **argv;
-	argv = CommandLineToArgvW (GetCommandLineW (), &argc);
-
-	SERVICE_TABLE_ENTRY DispatchTable[] = { 
-		{ 
-			SVCNAME, 
-			(LPSERVICE_MAIN_FUNCTION) SvcMain 
-		}, 
-		{ NULL, NULL } 
-	}; 
-
-	if( 
-		lstrcmpi( 
-			argv[1], 
-			TEXT("install")
-		) == 0 
-	) {
-		SvcInstall();
-		return EXIT_SUCCESS;
-	}
-
-	if (!StartServiceCtrlDispatcher( DispatchTable )) 
-...
2013 Aug 21
2
[PATCH 1/3] Rationalise whitespace to 4 space indentation with no trailing spaces
...*a_argv)
-{ 
+{
     /* For compatibility with MinGW, see:
-	http://demosten-eng.blogspot.com/2008/08/mingw-and-unicode-support.html */
+    http://demosten-eng.blogspot.com/2008/08/mingw-and-unicode-support.html */
     TCHAR **argv;
-	argv = CommandLineToArgvW (GetCommandLineW (), &argc);
-
-	SERVICE_TABLE_ENTRY DispatchTable[] = { 
-		{ 
-			SVCNAME, 
-			(LPSERVICE_MAIN_FUNCTION) SvcMain 
-		}, 
-		{ NULL, NULL } 
-	}; 
-
-	if( 
-		lstrcmpi( 
-			argv[1], 
-			TEXT("install")
-		) == 0 
-	) {
-		SvcInstall();
-		return EXIT_SUCCESS;
-	}
-
-	if (!StartServiceCtrlDispatcher( DispatchTable )) 
-...
2013 Nov 18
7
RHSrvAny: Fix failure on Windows 2003
The newly rebuilt RHSrvAny worked on Windows XP, Windows 2003 R2, and Windows
Vista+, but segfaulted on Windows 2003. After much investigation, the issue
seems to have been with inconsistent use of Unicode.
This series fixes compilation on Microsoft Visual C++ 2010 (the most recent
version which runs on Windows 2003), fixes all compiler warnings, and enabled
warnings during the build. The
2011 Aug 29
0
Fwd: [win32-service] win32 daemon error - Service_Main thread exited abnormally (#4)
...Dispatcher should fire the
svc_main win32 callback which never happens on my machine. I''ve spent
the past few days trying to see if I could fix it myself but I''m a
little stuck..
Am I right in understanding that the dispatch_table variable is just
trying to imitate a pointer to a service_table_entry struct? Does this
work for you guys doing it this way? It just hangs for me at this
point for about 5 seconds and then exits.
Was about to start playing with the gem ffi to see if I could create
an array of structs that way and just pass the actual pointer from
that? A bit unsure of how to tackle...
2006 Dec 07
0
Fwd: win32-service problems with patch
...you have threads running, tell them to stop. Something went
-   // wrong, and you need to stop them so you can inform the SCM.
-   SetEvent(hStopEvent);
-
-   // Stop the service.
-   SetTheServiceStatus(SERVICE_STOPPED, GetLastError(), 0, 0);
-}
-
 DWORD WINAPI ThreadProc(LPVOID lpParameter){
     SERVICE_TABLE_ENTRY ste[] =
       {{TEXT(""),(LPSERVICE_MAIN_FUNCTION)Service_Main}, {NULL, NULL}};
     if (!StartServiceCtrlDispatcher(ste)){
-       ErrorStopService();
-       strcpy(error,ErrorDescription(GetLastError()));
-       // Very questionable here, we should generate an event
-       // and b...