Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The DeleteKey
method deletes the registry key.
Syntax
NTSTATUS DeleteKey();
Return value
DeleteKey
returns STATUS_SUCCESS if the call was successful. Otherwise, the method returns an appropriate error code.
Remarks
A caller deletes an IRegistryKey object's registry key by calling the DeleteKey
method on that object. The key can be deleted only if the caller created the key with an ACCESS_MASK that permits deletion. The caller enables deletion by specifying a DesiredAccess parameter value of KEY_ALL_ACCESS (described in ZwCreateKey) to the PcNewRegistryKey, IPort::NewRegistryKey, or IRegistryKey::NewSubKey call that creates the key. When deleting a key, the IRegistryKey object discards its registry-key handle, and all other handles to the deleted key become invalid.
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Header | portcls.h (include Portcls.h) |
IRQL | PASSIVE_LEVEL |