WdfDriverGetRegistryPath function (wdfdriver.h)

[Applies to KMDF and UMDF]

The WdfDriverGetRegistryPath method retrieves the path to the driver's registry key in the registry's Services tree.

Syntax

PWSTR WdfDriverGetRegistryPath(
  [in] WDFDRIVER Driver
);

Parameters

[in] Driver

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

Return value

WdfDriverGetRegistryPath returns a pointer to a NULL-terminated Unicode string that represents the driver's registry path. A system bug check occurs if the Driver handle is invalid.

Remarks

The registry path string that WdfDriverGetRegistryPath returns is obtained from the UNICODE_STRING structure that the driver received as input to its DriverEntry routine.

For more information about the registry, see Using the Registry in Framework-Based Drivers.

Examples

The following code example obtains the path to a driver's registry key in the registry's Services tree.

PWSTR  registryPath;

registryPath = WdfDriverGetRegistryPath(driver);

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.0
Minimum UMDF version 2.0
Header wdfdriver.h (include Wdf.h)
Library Wdf01000.sys (KMDF); WUDFx02000.dll (UMDF)
IRQL PASSIVE_LEVEL
DDI compliance rules DriverCreate(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf)

See also

UNICODE_STRING

WdfDriverCreate

WdfDriverOpenParametersRegistryKey

WdfGetDriver