Group: Service - Library: advapi32
Encapsulating access to the Windows Services in a class
BOOL StartService(
SC_HANDLE hService,
DWORD dwNumServiceArgs,
LPCTSTR* lpServiceArgVectors
);
DECLARE INTEGER StartService IN advapi32;
INTEGER hService,;
LONG dwNumServiceArgs,;
INTEGER lpServiceArgVectors
hService [in] Handle to the service. This handle is returned by the OpenService or CreateService function, and it must have the SERVICE_START access right.
dwNumServiceArgs [in] Number of strings in the lpServiceArgVectors array. If lpServiceArgVectors is NULL, this parameter can be zero.
lpServiceArgVectors [in] Pointer to an array of pointers to null-terminated strings to be passed to a service as arguments.
If the function succeeds, the return value is nonzero.
A call to the StartService function to start a service in a locked database fails.
See also: ControlService, CreateService, OpenService, UnlockServiceDatabase.