[Win32utils-devel] Fwd: [win32-service] win32 daemon error - Service_Main thread exited abnormally (#4)

Daniel Berger djberg96 at gmail.com
Mon Aug 29 05:56:51 EDT 2011

Any suggestions?

---------- Forwarded message ----------
From: 2potatocakes
<reply+i-1463859-6ae63452bd734578892fcf4b571ee941f465e643 at reply.github.com>
Date: Mon, Aug 29, 2011 at 12:40 AM
Subject: Re: [win32-service] win32 daemon error - Service_Main thread
exited abnormally (#4)
To: djberg96 at gmail.com

Thanks for looking at this guys. Have updated the strcpy line.. I'm
still having problems though..

I'm pretty sure it's coming from the 2 lines:

dispatch_table = [""].pack('p') + [svc_main.address].pack('L') + "\0"*8
if(!StartServiceCtrlDispatcher(dispatch_table)) ....

I could be mistaken, but StartServiceCtrlDispatcher should fire the
svc_main win32 callback which never happens on my machine. I've spent
the past few days trying to see if I could fix it myself but I'm a
little stuck..

Am I right in understanding that the dispatch_table variable is just
trying to imitate a pointer to a service_table_entry struct? Does this
work for you guys doing it this way? It just hangs for me at this
point for about 5 seconds and then exits.

Was about to start playing with the gem ffi to see if I could create
an array of structs that way and just pass the actual pointer from
that? A bit unsure of how to tackle it at the moment, any suggestions?

Reply to this email directly or view it on GitHub:

More information about the win32utils-devel mailing list