DeleteKey method deletes the registry key.
NTSTATUS DeleteKey( );
This function has no parameters.
DeleteKey returns STATUS_SUCCESS if the call was successful. Otherwise, the method returns an appropriate error code.
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.
|Header||portcls.h (include Portcls.h)|