// usbpmapi.h
typedef struct _USBPM_EVENT_CALLBACK_PARAMS {
USBPM_EVENT_TYPE EventType;
union {
struct {
ULONG AccessGranted;
} PolicyManagerArrival;
struct {
USBPM_HUB HubHandle;
} HubArrivalRemoval;
struct {
USBPM_CONNECTOR ConnectorHandle;
} ConnectorStateChange;
} EventData;
PVOID Context;
} USBPM_EVENT_CALLBACK_PARAMS, *PUSBPM_EVENT_CALLBACK_PARAMS;
View the official Windows Driver Kit DDI referenceNo description available.
Contains the details of the events related to changes in policy manager arrival/removal, hub arrival/removal or connector state change. This structure is used in the EVT_USBPM_EVENT_CALLBACK callback function.
EventTypeA USBPM_EVENT_TYPE-type value that indicates the type of event.
EventDataA union that contains the event-specific data. The client driver should set the event data in the inner structure related to the event.
EventData.PolicyManagerArrivalData about the Policy Manager arrival event.
EventData.PolicyManagerArrival.AccessGrantedEventData.HubArrivalRemovalData about the hub arrival or removal event.
EventData.HubArrivalRemoval.HubHandleThe handle to the connector hub.
EventData.ConnectorStateChangeData about the connector state change event.
EventData.ConnectorStateChange.ConnectorHandleThe handle to the connector.
ContextThe context which is provided by the client driver in a previous call to UsbPm_Register.