WdfFdoInitWdmGetPhysicalDevice function (wdffdo.h)
[Applies to KMDF only]
The WdfFdoInitWdmGetPhysicalDevice method retrieves a device's WDM physical device object (PDO).
Syntax
PDEVICE_OBJECT WdfFdoInitWdmGetPhysicalDevice(
[in] PWDFDEVICE_INIT DeviceInit
);
Parameters
[in] DeviceInit
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);
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Minimum KMDF version | 1.0 |
Header | wdffdo.h (include Wdf.h) |
Library | Wdf01000.sys (see Framework Library Versioning.) |
IRQL | <= DISPATCH_LEVEL |
DDI compliance rules | DeviceInitAPI(kmdf), DriverCreate(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf) |