WdfRegistryRemoveValue メソッド

The WdfRegistryRemoveValue method removes a specified value and its data from a specified registry key.

構文

NTSTATUS WdfRegistryRemoveValue(
  [in]  WDFKEY Key,
  [in]  PCUNICODE_STRING ValueName
);

パラメーター

Key [in]

A handle to a registry-key object that represents an opened registry key.

ValueName [in]

A pointer to a UNICODE_STRING structure that contains a value name.

戻り値

WdfRegistryRemoveValue returns STATUS_SUCCESS if the operation succeeds. Otherwise, the method might return one of the following values:

リターン コード説明
STATUS_INVALID_DEVICE_REQUEST

WdfRegistryRemoveValue was not called at IRQL = PASSIVE_LEVEL.

STATUS_INVALID_PARAMETER

An invalid parameter was specified.

STATUS_ACCESS_DENIED

The driver did not open the registry key with KEY_SET_VALUE access.

 

This method also might return other NTSTATUS values.

A bug check occurs if the driver supplies an invalid object handle.

解説

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

The following code example removes the MyValue value and its data from a specified registry key.

DECLARE_CONST_UNICODE_STRING(valueName, L"MyValue");

status = WdfRegistryRemoveValue(
                                Key,
                                &valueName
                                );

要件

バージョン

Available in version 1.0 and later versions of KMDF.

ヘッダー

Wdfregistry.h (includeWdf.h)

ライブラリ

Wdf<MajorVersionNumber>000.sys (see Framework Library Versions.)

IRQL

PASSIVE_LEVEL

参照

UNICODE_STRING

 

 

コミュニティの追加

追加
表示:
© 2015 Microsoft