WdfDpcWdmGetDpc method

[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

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);

Requirements

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, KmdfIrql, KmdfIrql2

See also

WdfDpcCreate
KDPC
WDF_DPC_CONFIG
EvtDpcFunc

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.