The KSPIN_DISPATCH structure describes the callbacks for which clients can register in order to receive notification of pin events.
typedef struct {
PFNKSPINIRP Create;
PFNKSPINIRP Close;
PFNKSPIN Process;
PFNKSPINVOID Reset;
PFNKSPINSETDATAFORMAT SetDataFormat;
PFNKSPINSETDEVICESTATE SetDeviceState;
PFNKSPIN Connect;
PFNKSPINVOID Disconnect;
const KSCLOCK_DISPATCH* Clock;
const KSALLOCATOR_DISPATCH* Allocator;
} KSPIN_DISPATCH, *PKSPIN_DISPATCH;
Declared in ks.h. Include ks.h.
This structure is available in Windows XP and later operating systems and in DirectX 8.0 and later versions.
Any of the callback pointers can be NULL, indicating that the minidriver does not require to receive notification for this particular dispatch.
If the minidriver needs to determine whether or not it has been signaled to go to a specific state (for example KSSTATE_RUN), comparing the value of the DeviceState member of KSPIN to KSSTATE_RUN is not a reliable method of doing this. DeviceState refers to the state to which the pin has been signaled to go, not the pipe. To perform the above reliably, instead create a variable in the SetDeviceState callback of this structure and then check this variable to make the determination.
KSCLOCK_DISPATCH, KSALLOCATOR_DISPATCH, KsCompletePendingRequest, KSPIN