SERVICE_TRIGGER_SPECIFIC_DATA_ITEM structure

Contains trigger-specific data for a service trigger event. This structure is used by the SERVICE_TRIGGER structure for SERVICE_TRIGGER_TYPE_CUSTOM, SERVICE_TRIGGER_TYPE_DEVICE_ARRIVAL, SERVICE_TRIGGER_TYPE_FIREWALL_PORT_EVENT, or SERVICE_TRIGGER_TYPE_NETWORK_ENDPOINT trigger events.

Syntax


typedef struct _SERVICE_TRIGGER_SPECIFIC_DATA_ITEM {
  DWORD dwDataType;
  DWORD cbData;
  PBYTE pData;
} SERVICE_TRIGGER_SPECIFIC_DATA_ITEM, *PSERVICE_TRIGGER_SPECIFIC_DATA_ITEM;

Members

dwDataType

The data type of the trigger-specific data pointed to by pData. This member can be one of the following values.

ValueMeaning
SERVICE_TRIGGER_DATA_TYPE_BINARY
1

The trigger-specific data is in binary format.

SERVICE_TRIGGER_DATA_TYPE_STRING
2

The trigger-specific data is in string format.

SERVICE_TRIGGER_DATA_TYPE_LEVEL
3

The trigger-specific data is a byte value.

SERVICE_TRIGGER_DATA_TYPE_KEYWORD_ANY
4

The trigger-specific data is a 64-bit unsigned integer value.

SERVICE_TRIGGER_DATA_TYPE_KEYWORD_ALL
5

The trigger-specific data is a 64-bit unsigned integer value.

 

cbData

The size of the trigger-specific data pointed to pData, in bytes. The maximum value is 1024.

pData

A pointer to the trigger-specific data for the service trigger event. The trigger-specific data depends on the trigger event type; see Remarks.

If the dwDataType member is SERVICE_TRIGGER_DATA_TYPE_BINARY, the trigger-specific data is an array of bytes.

If the dwDataType member is SERVICE_TRIGGER_DATA_TYPE_STRING, the trigger-specific data is a null-terminated string or a multistring of null-terminated strings, ending with two null-terminating characters. For example: "5001\0UDP\0%programfiles%\MyApplication\MyServiceProcess.exe\0MyService\0\0".

Strings must be Unicode; ANSI strings are not supported.

Remarks

The following table lists trigger-specific data by trigger event type.

Event typeTrigger-specific data
SERVICE_TRIGGER_TYPE_CUSTOMSpecified by the Event Tracing for Windows (ETW) provider that defines the custom event.
SERVICE_TRIGGER_TYPE_DEVICE_INTERFACE_ARRIVALA SERVICE_TRIGGER_DATA_TYPE_STRING string that specifies a hardware ID or compatible ID string for the device interface class.
SERVICE_TRIGGER_TYPE_DOMAIN_JOINNot applicable.
SERVICE_TRIGGER_TYPE_FIREWALL_PORT_EVENTA SERVICE_TRIGGER_DATA_TYPE_STRING multi-string that specifies the port, the protocol, and optionally the executable path and name of the service listening on the event.
SERVICE_TRIGGER_TYPE_GROUP_POLICYNot applicable.
SERVICE_TRIGGER_TYPE_IP_ADDRESS_AVAILABILITYNot applicable.
SERVICE_TRIGGER_TYPE_NETWORK_ENDPOINTA SERVICE_TRIGGER_DATA_TYPE_STRING that specifies the port, named pipe, or RPC interface for the network endpoint.

 

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Winsvc.h

See also

ChangeServiceConfig2
QueryServiceConfig2
Service Trigger Events
SERVICE_TRIGGER

 

 

Community Additions

ADD
Show:
© 2014 Microsoft