WdfDriverWdmGetDriverObject - NtDoc

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

PDRIVER_OBJECT WdfDriverWdmGetDriverObject(
  [in] WDFDRIVER Driver
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdfdriver-wdfdriverwdmgetdriverobject)

WdfDriverWdmGetDriverObject function

Description

[Applies to KMDF only]

The WdfDriverWdmGetDriverObject method retrieves a pointer to the Windows Driver Model (WDM) driver object that is associated with a specified framework driver object.

Parameters

Driver [in]

A handle to the driver's framework driver object that the driver obtained from a previous call to WdfDriverCreate or WdfGetDriver.

Return value

WdfDriverWdmGetDriverObject returns a pointer to a DRIVER_OBJECT structure. A system bug check occurs if the Driver handle is invalid.

Remarks

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.

Examples

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);

See also

DRIVER_OBJECT

WdfDriverCreate

WdfGetDriver