WdfDpcWdmGetDpc - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdfdpc.h

PKDPC WdfDpcWdmGetDpc(
  [in] WDFDPC Dpc
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdfdpc-wdfdpcwdmgetdpc)

WdfDpcWdmGetDpc function

Description

[Applies to KMDF only]

The WdfDpcWdmGetDpc method returns a pointer to the KDPC structure that is associated with a specified framework DPC object.

Parameters

Dpc [in]

A handle to a framework DPC object.

Return value

WdfDpcWdmGetDpc returns a pointer to the KDPC structure that is associated with the specified framework DPC object.

A bug check occurs if the driver supplies an invalid object handle.

Remarks

The framework creates a KDPC structure when a framework-based driver calls WdfDpcCreate to create a DPC object.

A driver might call WdfDpcWdmGetDpc from within its EvtDpcFunc callback function.

The pointer that WdfDpcWdmGetDpc returns is valid until the framework DPC object is deleted. If the driver provides an EvtCleanupCallback function for the framework DPC object, the pointer is valid until the callback function returns.

Examples

The following code example returns a pointer to the KDPC structure that is associated with a specified DPC object. The WdfDpcCreate code example shows how the specified DPC object was created.

PKDPC pWdmDpc;

pWdmDpc = WdfDpcWdmGetDpc(PDevExt->CompleteWriteDpc);

See also

EvtDpcFunc

KDPC

WDF_DPC_CONFIG

WdfDpcCreate