search for: settheservicestatus

Displaying 6 results from an estimated 6 matches for "settheservicestatus".

2006 Dec 07
0
Fwd: win32-service problems with patch
...de; // I happen to know from looking in the header file // that 0 is not a valid service control code @@ -39,7 +34,6 @@ static VALUE service_close(VALUE); void WINAPI Service_Main(DWORD dwArgc, LPTSTR *lpszArgv); void WINAPI Service_Ctrl(DWORD dwCtrlCode); -void ErrorStopService(); void SetTheServiceStatus(DWORD dwCurrentState,DWORD dwWin32ExitCode, DWORD dwCheckPoint, DWORD dwWaitHint); @@ -57,27 +51,27 @@ (LPHANDLER_FUNCTION)Service_Ctrl); if(ssh == (SERVICE_STATUS_HANDLE)0){ - ErrorStopService(); - rb_raise(cDaemonError,"RegisterServiceC...
2005 Nov 26
1
Another patch of win32-service for nice startup.
...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(SERVICE_START_PENDING, 0, i, 1000); + } + // The service has started. SetTheServiceStatus(SERVICE_RUNNING, NO_ERROR, 0, 0); @@ -241,9 +252,9 @@ } #endif - // Create Thread for service main - hThread = CreateThread(NULL,0,ThreadProc,0,0,&ThreadId); - if(hThread == INVA...
2005 Nov 23
0
Some code change suggestions of thenwin32-service package
...nt and ideas for win32utils projects > Subject: [Win32utils-devel] Some code change suggestions of > thenwin32-service package > > > Hi, > > I''d like to suggest some code modifications and tests. > > In service.c > line # 50 : Commet out 1 line > // SetTheServiceStatus(SERVICE_RUNNING, NO_ERROR, 0, 0); > > line # 260 : Insert 4 lines > if(rb_respond_to(self,rb_intern("service_init"))){ > rb_funcall(self,rb_intern("service_init"),0); > } > SetTheServiceStatus(SERVICE_RUNNING, NO_ERROR, 0, 0); > > In...
2005 Nov 11
1
[Fwd: Thanks for win32-service]
Nice. :) -------------- next part -------------- An embedded message was scrubbed... From: Jamey Cribbs <cribbsj at oakwood.org> Subject: Thanks for win32-service Date: Fri, 11 Nov 2005 11:33:13 -0500 Size: 2505 Url: http://rubyforge.org/pipermail/win32utils-devel/attachments/20051111/5b46cd4f/Thanksforwin32-service.eml
2005 Sep 08
11
Stopping services
I''m back to getting stuff to run as a Windows service, and am running in to a problem. My service (a Daemon ruby class) installs and starts fine, but when I try to stop it, I get: C:\workspaces\default\tahoe>ruby script\service stop script/service:77:in `stop'': An exception occurred in the service when handling the control request. (Win32::ServiceError) from
2005 Nov 22
1
Win32 Service Timeout command
> -----Original Message----- > From: Jamey Cribbs [mailto:cribbsj at oakwood.org] > Sent: Tuesday, November 22, 2005 2:44 PM > To: Berger, Daniel > Subject: Win32 Service Timeout command > > > Hi, Dan. I have a quick question. Is there a way to set a timeout > variable when starting/creating a win32 service using your package? > When I attempt to start a