search for: lpszservicename

Displaying 1 result from an estimated 1 matches for "lpszservicename".

Did you mean: pszservicename
2005 Nov 26
1
Another patch of win32-service for nice startup.
...static VALUE rbServiceStruct, rbServiceStatusStruct; +static HANDLE hStartEvent; static HANDLE hStopEvent; static SERVICE_STATUS_HANDLE ssh; static DWORD dwServiceState; @@ -33,6 +34,7 @@ { DWORD bRet; DWORD dwWaitRes; + int i; // Obtain the name of the service. LPTSTR lpszServiceName = lpszArgv[0]; @@ -46,6 +48,15 @@ rb_raise(cDaemonError,"RegisterServiceCtrlHandler failed"); } + // wait for sevice initialization + for(i=1;TRUE;i++) + { + if(WaitForSingleObject(hStartEvent, 1000) == WAIT_OBJECT_0) + break; + + SetTheServiceStatus(SERV...