// ks.h
KSDDKAPI NTSTATUS KsDispatchSetSecurity(
[in] PDEVICE_OBJECT DeviceObject,
[in] PIRP Irp
);
View the official Windows Driver Kit DDI referenceNo description available.
The KsDispatchSetSecurity function is used in the KSDISPATCH_TABLE.SetSecurity entry to handle setting the current security descriptor. The assumption is that the KSOBJECT_HEADER structure is being used in the FsContext data structure and that the CreateItem points to a valid item that optionally contains a security descriptor.
DeviceObject [in]Specifies the device object associated with the IRP.
Irp [in]Specifies the IRP that is being handled.
The KsDispatchSetSecurity function returns the security set status and completes the IRP.
This security descriptor must be allocated in its own piece of pool memory, since KsDispatchSetSecurity will replace the existing descriptor with a new allocation. Therefore, it cannot be shared with CreateItem.