Compartir a través de


ActivateService

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function is called to load a service.

Syntax

HANDLE ActivateService(
  LPCWSTR lpszDevKey,
  DWORD dwClientInfo
);

Parameters

  • lpszDevKey
    [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.
  • dwClientInfo
    [in] Reserved and should be set to zero.

Return Value

A handle to the service is returned on success. A NULL value is returned on failure. For extended error information, call GetLastError.

Remarks

Once ActivateService has been called, Services.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.

Requirements

Header service.h
Library coredll.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Concepts

Services.exe Registry Settings

Other Resources

Services.exe