WdfFdoInitWdmGetPhysicalDevice - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdffdo.h

PDEVICE_OBJECT WdfFdoInitWdmGetPhysicalDevice(
  [in] PWDFDEVICE_INIT DeviceInit
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdffdo-wdffdoinitwdmgetphysicaldevice)

WdfFdoInitWdmGetPhysicalDevice function

Description

[Applies to KMDF only]

The WdfFdoInitWdmGetPhysicalDevice method retrieves a device's WDM physical device object (PDO).

Parameters

DeviceInit [in]

A pointer to a WDFDEVICE_INIT structure that the driver obtained from its EvtDriverDeviceAdd callback function.

Return value

If the operation succeeds, the method returns a pointer to a DEVICE_OBJECT structure. Otherwise the method returns NULL.

Remarks

The driver must call WdfFdoInitWdmGetPhysicalDevice before calling WdfDeviceCreate. For more information about calling WdfDeviceCreate, see Creating a Framework Device Object.

For more information about the WdfFdoInitWdmGetPhysicalDevice method, see Creating Device Objects in a Function Driver.

Examples

The following code example obtains a pointer to a DEVICE_OBJECT structure that represents a device's WDM PDO.

PDEVICE_OBJECT device;

device = WdfFdoInitWdmGetPhysicalDevice(DeviceInit);