DXGKDDI_CREATECPUEVENT callback function (d3dkmddi.h)
DXGKDDI_CREATECPUEVENT creates the kernel-mode driver's (KMD's) CPU event object for the corresponding Dxgkrnl object.
Syntax
DXGKDDI_CREATECPUEVENT DxgkddiCreatecpuevent;
NTSTATUS DxgkddiCreatecpuevent(
IN_CONST_HANDLE hAdapter,
INOUT_PDXGKARG_CREATECPUEVENT pArgs
)
{...}
Parameters
hAdapter
[in] Handle to a KMD context that is associated with a display adapter. The display miniport driver previously provided this handle to Dxgkrnl in the MiniportDeviceContext output parameter of the DXGKDDI_ADD_DEVICE function.
pArgs
[in/out] Pointer to a DXGKARG_CREATECPUEVENT structure with additional parameters.
Return value
DXGKDDI_CREATECPUEVENT returns STATUS_SUCCESS if it succeeds; otherwise, it returns one of the error codes defined in Ntstatus.h.
Remarks
KMD CPU event sync objects are linked with a device object (hKmdDevice). When a device object is destroyed, Dxgkrnl will destroy all associated KMD CPU event sync objects by calling DXGKDDI_DESTROYCPUEVENT.
KMD can signal the event by calling DXGKCB_SIGNALEVENT and providing the hDxgCpuEvent handle.
The CPU event object lifetime does not depend on KMD's device lifetime; that is, the object could be destroyed after the device is destroyed. hKmdDevice is passed so the driver can associate the KMD process objects (created by DXGKDDI_CREATEPROCESS) with the CPU event object.
See Signaling a CPU event from KMD for more information.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 11 version 21H2 (WDDM 3.0) |
Header | d3dkmddi.h |
IRQL | PASSIVE_LEVEL |