// ks.h
typedef struct _KSDEVICE_DISPATCH {
PFNKSDEVICECREATE Add;
PFNKSDEVICEPNPSTART Start;
PFNKSDEVICE PostStart;
PFNKSDEVICEIRP QueryStop;
PFNKSDEVICEIRPVOID CancelStop;
PFNKSDEVICEIRPVOID Stop;
PFNKSDEVICEIRP QueryRemove;
PFNKSDEVICEIRPVOID CancelRemove;
PFNKSDEVICEIRPVOID Remove;
PFNKSDEVICEQUERYCAPABILITIES QueryCapabilities;
PFNKSDEVICEIRPVOID SurpriseRemoval;
PFNKSDEVICEQUERYPOWER QueryPower;
PFNKSDEVICESETPOWER SetPower;
PFNKSDEVICEIRP QueryInterface;
} KSDEVICE_DISPATCH, *PKSDEVICE_DISPATCH;
View the official Windows Driver Kit DDI referenceNo description available.
The KSDEVICE_DISPATCH structure describes the callbacks that a client can provide to receive notification of device creation and PnP events.
AddOptional. Can be NULL. A pointer to a minidriver-supplied AVStrMiniDeviceAdd callback routine.
StartOptional. Can be NULL. A pointer to a minidriver-supplied AVStrMiniDeviceStart callback routine.
PostStartOptional. Can be NULL. A pointer to a minidriver-supplied AVStrMiniDevicePostStart callback routine.
QueryStopOptional. Can be NULL. A pointer to a minidriver-supplied AVStrMiniDeviceQueryStop callback routine.
CancelStopOptional. Can be NULL. A pointer to a minidriver-supplied AVStrMiniDeviceCancelStop callback routine.
StopOptional. Can be NULL. A pointer to a minidriver-supplied AVStrMiniDeviceStop callback routine.
QueryRemoveOptional. Can be NULL. A pointer to a minidriver-supplied AVStrMiniDeviceQueryRemove callback routine.
CancelRemoveOptional. Can be NULL. A pointer to a minidriver-supplied AVStrMiniDeviceCancelRemove callback routine.
RemoveOptional. Can be NULL. A pointer to a minidriver-supplied AVStrMiniDeviceRemove callback routine.
QueryCapabilitiesOptional. Can be NULL. A pointer to a minidriver-supplied AVStrMiniDeviceQueryCapabilities callback routine.
SurpriseRemovalOptional. Can be NULL. A pointer to a minidriver-supplied AVStrMiniDeviceSurpriseRemoval callback routine.
QueryPowerOptional. can be NULL. A pointer to a minidriver-supplied AVStrMiniDeviceQueryPower callback routine.
SetPowerOptional. Can be NULL. A pointer to a minidriver-supplied AVStrMiniDeviceSetPower callback routine.
QueryInterfaceOptional. Can be NULL. A pointer to a minidriver-supplied AVStrMiniDeviceQueryInterface callback routine.
In describing a device with the KSDEVICE_DESCRIPTOR structure, clients include a pointer to a dispatch table defined by this structure. Any member of this structure may be NULL indicating that the minidriver receives no notification for that particular message.