// wdfdpc.h
WDFOBJECT WdfDpcGetParentObject(
[in] WDFDPC Dpc
);
View the official Windows Driver Kit DDI referenceNo description available.
[Applies to KMDF only]
The WdfDpcGetParentObject method returns the parent object of a specified DPC object.
Dpc [in]A handle to a framework DPC object.
WdfDpcGetParentObject returns a handle to the parent object of a specified DPC object.
A bug check occurs if the driver supplies an invalid object handle.
A driver might call WdfDpcGetParentObject from within its EvtDpcFunc callback function.
The following code example returns a handle to the parent object of a specified DPC object. The WdfDpcCreate code example shows how the specified DPC object was created.
WDFDEVICE Device;
Device = WdfDpcGetParentObject(PDevExt->CompleteWriteDpc);