search for: dwwaitres

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

2005 Nov 26
1
Another patch of win32-service for nice startup.
...1-27 00:01:58.000000000 +0900 @@ -14,6 +14,7 @@ static VALUE cDaemonError; 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(hStart...