ActivateService (Compact 2013)
This function is called to load a service.
HANDLE ActivateService( LPCWSTR lpszDevKey, DWORD dwClientInfo );
[in] Pointer to the string that contains the name of the service to load. Information concerning the service's DLL name and other parameters is specified in the registry key HKEY_LOCAL_MACHINE\Services\lpszDevKey.
[in] Reserved; set to 0 (zero).
A handle to the service is returned on success. A NULL value is returned on failure. For extended error information, call GetLastError.
Once ActivateService has been called, Servicesd.exe retrieves information about the service in HKEY_LOCAL_MACHINE\Services\lpszDevKey and loads the service as if it were being loaded upon system initialization.
For more information about setting up a service registry key for ActivateService or for use at system initialization, see Servicesd.exe Registry Settings.
|ActivateService can be called from either privileged or normal applications, regardless of the setting of the DEVFLAGS_TRUSTEDCALLERONLY registry flag for the service. If a privileged application activates a service, a normal application cannot unload the service. However, if a normal application activates the service, then either a privileged application or a normal application can unload the service.|