Expand Minimize

WdfDeviceWdmGetPhysicalDevice method

[Applies to KMDF only]

The WdfDeviceWdmGetPhysicalDevice method retrieves the physical device's WDM PDO from the device stack.

Syntax


PDEVICE_OBJECT WdfDeviceWdmGetPhysicalDevice(
  [in]  WDFDEVICE Device
);

Parameters

Device [in]

A handle to a framework device object.

Return value

WdfDeviceWdmGetPhysicalDevice returns a pointer to a DEVICE_OBJECT structure.

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

Remarks

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

Examples

For a code example that uses WdfDeviceWdmGetPhysicalDevice, see WdfDeviceWdmGetAttachedDevice.

Requirements

Minimum KMDF version

1.0

Header

Wdfdevice.h (include Wdf.h)

Library

Wdf01000.sys (see Framework Library Versioning.)

IRQL

<=DISPATCH_LEVEL

DDI compliance rules

DriverCreate, KmdfIrql, KmdfIrql2

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft