[Win32utils-devel] Service event hooks question

win32utils-devel at rubyforge.org win32utils-devel at rubyforge.org
Fri Feb 6 10:26:37 EST 2004

> In order to be able to call event hooks as I mentioned previously it
> looks like I'll have to do something like this in Service_Ctrl():
> // For example
> if(dwCtrlCode == SERVICE_CONTROL_STOP){
>    rb_funcall(self,rb_intern("send"),rb_intern("on_stop"));
> }
> There are a few problems.  First, I'm not sure I'm calling that
> properly.  Second, I don't know how to get "self" into the method - I
> making cDaemon global and passing that but it didn't seem to work.
> Third, this syntax doesn't cause an error but it doesn't seem to
> actually work.
> Any ideas?
> I suppose I should add a "respond_to?" for each of the hooks as well.
> Regards,
> Dan
I committed new version of service.c.
Now default hooking function can be called without explicit hooking.


Park Heesob

--MIME Multi-part separator--

More information about the win32utils-devel mailing list