// wdfdevice.h
PDEVICE_OBJECT WdfDeviceWdmGetPhysicalDevice(
[in] WDFDEVICE Device
);
View the official Windows Driver Kit DDI reference
No description available.
[Applies to KMDF only]
The WdfDeviceWdmGetPhysicalDevice method retrieves the physical device's WDM PDO from the device stack.
Device
[in]A handle to a framework device object.
WdfDeviceWdmGetPhysicalDevice returns a pointer to a DEVICE_OBJECT structure.
A bug check occurs if the driver supplies an invalid object handle.
WdfDeviceWdmGetPhysicalDevice returns NULL if the caller supplies a control device object.
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.
For a code example that uses WdfDeviceWdmGetPhysicalDevice, see WdfDeviceWdmGetAttachedDevice.