WdfDriverGetRegistryPath method

[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

Driver [in]

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

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, KmdfIrql, KmdfIrql2

See also

UNICODE_STRING
WdfDriverCreate
WdfDriverOpenParametersRegistryKey
WdfGetDriver

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.