// ks.h
typedef struct {
ULONG NotificationType;
union {
struct {
HANDLE Event;
ULONG_PTR Reserved[2];
} EventHandle;
struct {
HANDLE Semaphore;
ULONG Reserved;
LONG Adjustment;
} SemaphoreHandle;
struct {
PVOID Event;
KPRIORITY Increment;
ULONG_PTR Reserved;
} EventObject;
struct {
PVOID Semaphore;
KPRIORITY Increment;
LONG Adjustment;
} SemaphoreObject;
struct {
PKDPC Dpc;
ULONG ReferenceCount;
ULONG_PTR Reserved;
} Dpc;
struct {
PWORK_QUEUE_ITEM WorkQueueItem;
WORK_QUEUE_TYPE WorkQueueType;
ULONG_PTR Reserved;
} WorkItem;
struct {
PWORK_QUEUE_ITEM WorkQueueItem;
PKSWORKER KsWorkerObject;
ULONG_PTR Reserved;
} KsWorkItem;
struct {
PVOID Unused;
LONG_PTR Alignment[2];
} Alignment;
};
} KSEVENTDATA, *PKSEVENTDATA;
View the official Windows Driver Kit DDI referenceNo description available.
Kernel streaming clients send the KSEVENTDATA structure to the class driver to specify a notification method.
NotificationTypeContains flags indicating what type of notification should be performed. The following table lists all the possible values for the NotificationType member.
| NotificationType Flag | Description |
|---|---|
| KSEVENTF_EVENT_HANDLE | Indicates that a Win32 synchronization or notification object handle is being passed. The KSEVENTDATA.EventHandle.Event element contains the handle. |
| KSEVENTF_SEMAPHORE_HANDLE | Indicates that a Win32 semaphore handle is being passed. The KSEVENTDATA.SemaphoreHandle.Semaphore element contains the handle. |
| KSEVENTF_EVENT_OBJECT | Indicates that a pointer to a kernel synchronization or notification object is being passed. The KSEVENTDATA.EventObject.Event element contains a pointer to this object. This is available only to kernel-mode clients. |
| KSEVENTF_SEMAPHORE_OBJECT | Indicates that a pointer to a kernel semaphore object is being passed. The KSEVENTDATA.SemaphoreObject.Semaphore element contains a pointer to this object. This is available only to kernel-mode clients. |
| KSEVENTF_DPC | Indicates that a pointer to a kernel DPC structure is being passed. The KSEVENTDATA.Dpc.Dpc element contains a pointer to the DPC. This is available only to kernel-mode clients. |
| KSEVENTF_WORKITEM | Indicates that a pointer to a kernel work item structure is being passed. The KSEVENTDATA.WorkItem.WorkQueueItem contains a pointer to the work item. This is available only to kernel-mode clients. |
| KSEVENTF_KSWORKITEM | Indicates that a pointer to a kernel streaming work item structure is being passed. The KSEVENTDATA.KsWorkItem.WorkQueueItem contains a pointer to the work item, and is queued to a previously registered kernel streaming work item. This is available only to kernel-mode clients. |
EventHandleDefines the EventHandle structure.
EventHandle.EventContains a handle to a synchronization event when the KSEVENT_EVENT_HANDLE flag is set.
EventHandle.ReservedReserved and set to zero.
SemaphoreHandleDefines the SemaphoreHandle structure.
SemaphoreHandle.SemaphoreContains a handle to a semaphore when the KSEVENT_SEMAPHORE_HANDLE flag is set.
SemaphoreHandle.ReservedReserved and set to zero.
SemaphoreHandle.AdjustmentContains the adjustment to the semaphore when it is released.
EventObjectDefines the EventObject structure.
EventObject.EventDefines the PVOID member Event.
EventObject.IncrementDefines the KPRIORITY member Increment.
EventObject.ReservedReserved and set to zero.
SemaphoreObjectDefines the SemaphoreObject structure.
SemaphoreObject.SemaphoreDefines the PVOID member Semaphore.
SemaphoreObject.IncrementDefines the KPRIORITY member Increment.
SemaphoreObject.AdjustmentDefines the LONG member Adjustment.
DpcDefines the Dpc structure.
Dpc.DpcDefines the PKDPC member Dpc.
Dpc.ReferenceCountDefines the ULONG member ReferenceCount.
Dpc.ReservedReserved and set to zero.
WorkItemDefines the WorkItem structure.
WorkItem.WorkQueueItemDefines the PWORK_QUEUE_ITEM member WorkQueueItem.
WorkItem.WorkQueueTypeDefines the WORK_QUEUE_TYPE member WorkQueueType.
WorkItem.ReservedReserved and set to zero.
KsWorkItemDefines the KsWorkItem structure.
KsWorkItem.WorkQueueItemDefines the PWORK_QUEUE_ITEM member WorkQueueItem.
KsWorkItem.KsWorkerObjectDefines the PKSWORKER member KsWorkerObject.
KsWorkItem.ReservedReserved for future use.
AlignmentDefines the Alignment structure.
Alignment.UnusedNot used.
Alignment.AlignmentReserved for internal use by AVStream. Minidrivers should not manipulate this member.
For more information, see KS Events.