[Win32utils-devel] Service.start arguments failing or causing segfault
djberg96 at gmail.com
Sat Nov 24 09:40:38 EST 2007
Heesob Park wrote:
> Don't ask me why, just follow the rule of the microsoft :)
> Acording to http://msdn2.microsoft.com/en-US/library/ms686321.aspx ,
> StartService function requires NULL or an argument which the first
> element must be service name.
> And argument type is not LPCSTR, but LPCTSTR* ( pointer of string), so
> it need to be packed.
Oops, I did see a mistake with num_args. It should be like this I think:
num_args = 0
args = nil
num_args = args.length
args = [args.join("\000")].pack('p*')
I forgot to add 1 for the service name.
The only problem is, now it segfaults. :(
More information about the win32utils-devel