WdfDpcWdmGetDpc function (wdfdpc.h)
[Applies to KMDF only]
The WdfDpcWdmGetDpc method returns a pointer to the KDPC structure that is associated with a specified framework DPC object.
Syntax
PKDPC WdfDpcWdmGetDpc(
[in] WDFDPC Dpc
);
Parameters
[in] Dpc
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);
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Minimum KMDF version | 1.0 |
Header | wdfdpc.h (include Wdf.h) |
Library | Wdf01000.sys (see Framework Library Versioning.) |
IRQL | Any level |
DDI compliance rules | DriverCreate(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf) |