Displaying 7 results from an estimated 7 matches for "service_run".
Did you mean:
service_rpc
2005 Nov 26
1
Another patch of win32-service for nice startup.
...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 == INVALID_HANDLE_VALUE){
+ // Create the event to signal the service to start.
+ hStartEvent = CreateEvent(NULL,...
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 Nov 23
0
Some code change suggestions of thenwin32-service package
...32utils 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 Ruby source...
2004 Feb 02
4
Hooks for win32-service
Just trying to come up with hooks for win32-service. It looks like
Perl''s Win32::Daemon defines these:
start....................The service is starting.
pause....................The service is entering a paused state.
continue.................The service is resuming from a paused state.
stop.....................The service is stopping
running..................The service is running
2013 Aug 21
2
[PATCH 1/3] Rationalise whitespace to 4 space indentation with no trailing spaces
...(ghSvcStopEvent == NULL) {
ReportSvcStatus (
- SERVICE_STOPPED,
- NO_ERROR,
- 0
- );
+ SERVICE_STOPPED,
+ NO_ERROR,
+ 0
+ );
return;
}
// Report running status when initialization is complete.
ReportSvcStatus (
- SERVICE_RUNNING,
- NO_ERROR,
- 0
- );
+ SERVICE_RUNNING,
+ NO_ERROR,
+ 0
+ );
// TO_DO: Perform work until service stops.
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
- nSize=1024;
+ nSize=1024;
#ifdef HAVE_SW...
2013 Aug 29
5
[PATCH 1/6] Rationalise whitespace to 4 space indentation with no trailing spaces
...(ghSvcStopEvent == NULL) {
ReportSvcStatus (
- SERVICE_STOPPED,
- NO_ERROR,
- 0
- );
+ SERVICE_STOPPED,
+ NO_ERROR,
+ 0
+ );
return;
}
// Report running status when initialization is complete.
ReportSvcStatus (
- SERVICE_RUNNING,
- NO_ERROR,
- 0
- );
+ SERVICE_RUNNING,
+ NO_ERROR,
+ 0
+ );
// TO_DO: Perform work until service stops.
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
- nSize=1024;
+ nSize=1024;
#ifdef HAVE_SW...
2006 Dec 07
0
Fwd: win32-service problems with patch
...ngleObject(hStartEvent, 1000) == WAIT_OBJECT_0)
- break;
-
- SetTheServiceStatus(SERVICE_START_PENDING, 0, i, 1000);
+ // no service to stop, no service handle to notify,
+ // nothing to do but exit
+ return;
}
// The service has started.
SetTheServiceStatus(SERVICE_RUNNING, NO_ERROR, 0, 0);
+ SetEvent(hStartEvent);
+
// Main loop for the service.
while(WaitForSingleObject(hStopEvent, 1000) != WAIT_OBJECT_0)
{
}
+ // Main loop for the service.
+ while(WaitForSingleObject(hStopCompletedEvent, 1000) != WAIT_OBJECT_0)
+ {
+ OutputDebugS...