次の方法で共有


ServiceEnumInfo (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

Typedef struct_ServiceEnumInfo {
  WCHAR szPrefix[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 Embedded 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 Embedded CE conventions.

Requirements

Header service.h
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Services.exe Structures
ActivateService
RegisterService
GetServiceHandle
EnumServices

Other Resources

CreateFile
Services.exe