WDF_PNPPOWER_EVENT_CALLBACKS structure (wdfdevice.h)

[Applies to KMDF and UMDF]

The WDF_PNPPOWER_EVENT_CALLBACKS structure contains pointers to a driver's Plug and Play and power event callback functions.

Syntax

typedef struct _WDF_PNPPOWER_EVENT_CALLBACKS {
  ULONG                                           Size;
  PFN_WDF_DEVICE_D0_ENTRY                         EvtDeviceD0Entry;
  PFN_WDF_DEVICE_D0_ENTRY_POST_INTERRUPTS_ENABLED EvtDeviceD0EntryPostInterruptsEnabled;
  PFN_WDF_DEVICE_D0_EXIT                          EvtDeviceD0Exit;
  PFN_WDF_DEVICE_D0_EXIT_PRE_INTERRUPTS_DISABLED  EvtDeviceD0ExitPreInterruptsDisabled;
  PFN_WDF_DEVICE_PREPARE_HARDWARE                 EvtDevicePrepareHardware;
  PFN_WDF_DEVICE_RELEASE_HARDWARE                 EvtDeviceReleaseHardware;
  PFN_WDF_DEVICE_SELF_MANAGED_IO_CLEANUP          EvtDeviceSelfManagedIoCleanup;
  PFN_WDF_DEVICE_SELF_MANAGED_IO_FLUSH            EvtDeviceSelfManagedIoFlush;
  PFN_WDF_DEVICE_SELF_MANAGED_IO_INIT             EvtDeviceSelfManagedIoInit;
  PFN_WDF_DEVICE_SELF_MANAGED_IO_SUSPEND          EvtDeviceSelfManagedIoSuspend;
  PFN_WDF_DEVICE_SELF_MANAGED_IO_RESTART          EvtDeviceSelfManagedIoRestart;
  PFN_WDF_DEVICE_SURPRISE_REMOVAL                 EvtDeviceSurpriseRemoval;
  PFN_WDF_DEVICE_QUERY_REMOVE                     EvtDeviceQueryRemove;
  PFN_WDF_DEVICE_QUERY_STOP                       EvtDeviceQueryStop;
  PFN_WDF_DEVICE_USAGE_NOTIFICATION               EvtDeviceUsageNotification;
  PFN_WDF_DEVICE_RELATIONS_QUERY                  EvtDeviceRelationsQuery;
  PFN_WDF_DEVICE_USAGE_NOTIFICATION_EX            EvtDeviceUsageNotificationEx;
} WDF_PNPPOWER_EVENT_CALLBACKS, *PWDF_PNPPOWER_EVENT_CALLBACKS;

Members

Size

The size, in bytes, of this structure.

EvtDeviceD0Entry

A pointer to the driver's EvtDeviceD0Entry event callback function, or NULL.

EvtDeviceD0EntryPostInterruptsEnabled

A pointer to the driver's EvtDeviceD0EntryPostInterruptsEnabled event callback function, or NULL.

EvtDeviceD0Exit

A pointer to the driver's EvtDeviceD0Exit event callback function, or NULL.

EvtDeviceD0ExitPreInterruptsDisabled

A pointer to the driver's EvtDeviceD0ExitPreInterruptsDisabled event callback function, or NULL.

EvtDevicePrepareHardware

A pointer to the driver's EvtDevicePrepareHardware event callback function, or NULL.

EvtDeviceReleaseHardware

A pointer to the driver's EvtDeviceReleaseHardware event callback function, or NULL.

EvtDeviceSelfManagedIoCleanup

A pointer to the driver's EvtDeviceSelfManagedIoCleanup event callback function, or NULL.

EvtDeviceSelfManagedIoFlush

A pointer to the driver's EvtDeviceSelfManagedIoFlush event callback function, or NULL.

EvtDeviceSelfManagedIoInit

A pointer to the driver's EvtDeviceSelfManagedIoInit event callback function, or NULL.

EvtDeviceSelfManagedIoSuspend

A pointer to the driver's EvtDeviceSelfManagedIoSuspend event callback function, or NULL.

EvtDeviceSelfManagedIoRestart

A pointer to the driver's EvtDeviceSelfManagedIoRestart event callback function, or NULL.

EvtDeviceSurpriseRemoval

A pointer to the driver's EvtDeviceSurpriseRemoval event callback function, or NULL.

EvtDeviceQueryRemove

A pointer to the driver's EvtDeviceQueryRemove event callback function, or NULL.

EvtDeviceQueryStop

A pointer to the driver's EvtDeviceQueryStop event callback function, or NULL.

EvtDeviceUsageNotification

A pointer to the driver's EvtDeviceUsageNotification event callback function, or NULL.

EvtDeviceRelationsQuery

A pointer to the driver's EvtDeviceRelationsQuery event callback function, or NULL.

EvtDeviceUsageNotificationEx

A pointer to the driver's EvtDeviceUsageNotificationEx event callback function, or NULL. The EvtDeviceUsageNotificationEx member is available in version 1.11 and later versions of KMDF. A driver can register either EvtDeviceRelationsQuery or EvtDeviceUsageNotificationEx, but not both.

Remarks

The WDF_PNPPOWER_EVENT_CALLBACKS structure is used as input to the WdfDeviceInitSetPnpPowerEventCallbacks method.

Your driver should initialize its WDF_PNPPOWER_EVENT_CALLBACKS structure by calling WDF_PNPPOWER_EVENT_CALLBACKS_INIT.

Requirements

Requirement Value
Minimum KMDF version 1.0
Minimum UMDF version 2.0
Header wdfdevice.h (include Wdf.h)

See also

WDF_POWER_POLICY_EVENT_CALLBACKS