A small update... Something like:
schService = CreateService(
schSCManager, // SCManager database
TEXT(SZSERVICENAME), // name of service
TEXT(SZSERVICEDISPLAYNAME), // name to display
SERVICE\_ALL\_ACCESS, // desired access
SERVICE\_WIN32\_OWN\_PROCESS, // service type
SERVICE\_DEMAND\_START, // start type
SERVICE\_ERROR\_NORMAL, // error control type
szPath, // service's binary
NULL, // no load ordering group
NULL, // no tag identifier
TEXT(SZDEPENDENCIES), // dependencies
NULL, // LocalSystem account
NULL); // no password
- Anders Money talks, but all mine ever says is "Goodbye!"