WdfDeviceGetDriver method
[Applies to KMDF and UMDF]
The WdfDeviceGetDriver method returns a handle to the framework driver object that is associated with a specified framework device object.
Syntax
WDFDRIVER WdfDeviceGetDriver(
[in] WDFDEVICE Device
);
Parameters
- Device [in]
-
A handle to a framework device object.
Return value
WdfDeviceGetDriver returns a handle to a framework driver object.
A bug check occurs if the driver supplies an invalid object handle.
Examples
The following code example uses the WdfDeviceGetDriver method's return value as an argument to WdfDriverGetRegistryPath.
PWSTR registryPath; registryPath = WdfDriverGetRegistryPath(WdfDeviceGetDriver(device));
Requirements
Minimum KMDF version | 1.0 |
---|---|
Minimum UMDF version | 2.0 |
Header |
|
Library |
|
IRQL | <= DISPATCH_LEVEL |
DDI compliance rules | DriverCreate, KmdfIrql, KmdfIrql2 |
See also
Show: