The ZwDeleteValueKey routine deletes a value entry matching a name from an open key in the registry. If no such entry exists, an error is returned.
NTSYSAPI NTSTATUS ZwDeleteValueKey( HANDLE KeyHandle, PUNICODE_STRING ValueName );
The handle to the registry key containing the value entry of interest. This key must have been opened with KEY_SET_VALUE set for the desired access. This handle is created by a successful call to ZwCreateKey or ZwOpenKey.
Pointer to a UNICODE_STRING structure that contains the name of the value entry to delete. This parameter can be an empty string if the value entry has no name.
ZwDeleteValueKey returns STATUS_SUCCESS or an appropriate error status representing the final completion status of the operation. Possible error status codes include the following:
||The KeyHandle handle does not have the KEY_SET_VALUE access.|
||Additional resources required by this function were not available.|
||The specified KeyHandle parameter was a NULL pointer or not a valid pointer to an open registry key.|
||The ValueName registry key entry was not found.|
The KeyHandle passed to ZwDeleteValueKey must have been opened for delete access to succeed. The DesiredAccess values of KEY_SET_VALUE, KEY_WRITE, and KEY_ALL_ACCESS include the KEY_SET_VALUE access mask required for delete access. For a description of possible values for DesiredAccess, see ZwCreateKey.
If callback functions are registered for this registry key, then these callback functions will be called.
Device drivers should not attempt to call ZwDeleteValueKey directly to delete value entries in a subkey of the \Registry..\ResourceMap key. Only the system can write or delete value entries in the \Registry..\HardwareDescription tree.
|Windows version||Available starting with Windows 2000.|
|Header||wdm.h (include Wdm.h, Ntddk.h, Ntifs.h, Fltkernel.h)|
|DDI compliance rules||PowerIrpDDis, HwStorPortProhibitedDDIs|