WdfDriverOpenPersistentStateRegistryKey - NtDoc

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

NTSTATUS WdfDriverOpenPersistentStateRegistryKey(
  [in]           WDFDRIVER              Driver,
  [in]           ACCESS_MASK            DesiredAccess,
  [in, optional] PWDF_OBJECT_ATTRIBUTES KeyAttributes,
  [out]          WDFKEY                 *Key
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

Description

Drivers should use WdfDriverOpenPersistentStateRegistryKey to write driver wide persistent information to the registry.

Parameters

Driver [in]

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

DesiredAccess [in]

An ACCESS_MASK typed value that specifies an access mask for the registry key. A KMDF driver typically requests KEY_READ, KEY_WRITE, or KEY_READ | KEY_WRITE. If you are writing a UMDF driver, use KEY_READ or KEY_READ | KEY_SET_VALUE. As a best practice, ask for only the types of access that your driver needs.

KeyAttributes [in, optional]

A pointer to a caller-allocated WDF_OBJECT_ATTRIBUTES structure that specifies object attributes for the framework registry-key object. This parameter is optional and can be WDF_NO_OBJECT_ATTRIBUTES.

Key [out]

A pointer to a location that receives a handle to a framework registry-key object.

Return value

Refer to WdfDriverOpenParametersRegistryKey.

Remarks

The Parameters key is for immutable settings provided in the INF file. To access those settings, use WdfDriverOpenParametersRegistryKey. The key returned from this API is for settings written at runtime.

See also

WdfDriverOpenParametersRegistryKey

IoOpenDriverRegistryKey

DRIVER_REGKEY_TYPE