ServiceEnumInfo (Windows CE 5.0)

Send Feedback

This structure contains information about a particular service running on the device.

Typedef struct_ServiceEnumInfo {WCHARszPrefix[6];WCHAR szDllName;HANDLE hServiceHandle;DWORD dwServiceState;} ServiceEnumInfo;

Members

  • szPrefix
    String that contains the prefix of the device in the form XXXN:, where XXX is the prefix specified on either RegisterService or the prefix registry value read during ActivateService, and N is the index number. For example, the prefix HTP0: specifies the Web server. This is the string used to open a service using either CreateFile or to get the service handle using GetServiceHandle.
  • szDllName
    String that contains the name of the DLL that contains the service.
  • hServiceHandle
    Service handle.
  • dwServiceState
    Specifies the current state of the service. The following table shows the service states defined by Windows CE.
    Value Description
    SERVICE_STATE_OFF = 0 The service is turned off.
    SERVICE_STATE_ON = 1 The service is turned on.
    SERVICE_STATE_STARTING_UP = 2 The service is in the process of starting up.
    SERVICE_STATE_SHUTTING_DOWN = 3 The service is in the process of shutting down.
    SERVICE_STATE_UNLOADING = 4 The service is in the process of unloading.
    SERVICE_STATE_UNINITIALIZED = 5 The service is not uninitialized.
    SERVICE_STATE_UNKNOWN = 0xffffffff The state of the service is unknown.

Remarks

The service itself and not Services.exe keeps track of the current state. Services.exe only queries for state information during calls to EnumServices. It is possible that a service may return a value not listed in the previous table, although you are strongly encouraged to use existing Windows CE conventions.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Service.h.

See Also

ActivateService | RegisterService | GetServiceHandle | CreateFile | EnumServices | Services.exe

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.