The WdfDriverWdmGetDriverObject method retrieves a pointer to the Windows Driver Model (WDM) driver object that is associated with a specified framework driver object.
PDRIVER_OBJECT WdfDriverWdmGetDriverObject( [in] WDFDRIVER Driver );
- Driver [in]
WdfDriverWdmGetDriverObject returns a pointer to a DRIVER_OBJECT structure. A system bug check occurs if the Driver handle is invalid.
The pointer that the WdfDriverWdmGetDriverObject method returns is valid until the framework driver object is deleted. If the driver provides an EvtCleanupCallback function for the framework driver object, the pointer is valid until the callback function returns.
The following code example obtains a pointer to the WDM driver object that is associated with a specified framework driver object.
PDRIVER_OBJECT pDrvObj; pDrvObj = WdfDriverWdmGetDriverObject(Driver);
|Available in version 1.0 and later versions of KMDF.|
|Wdf<MajorVersionNumber>000.sys (see Framework Library Versions.)|