NTSTATUS
ZwOpenKey(
OUT PHANDLE KeyHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
ZwOpenKey opens an existing key in the registry.
ZwOpenKey returns STATUS_SUCCESS if the given key was opened. Otherwise, it can return an error status, including the following values:
STATUS_INVALID_HANDLE
STATUS_ACCESS_DENIED
ZwOpenKey or ZwCreateKey must be called before any of the Zw...Key routines that require an input KeyHandle.
If the specified key does not exist or the DesiredAccess requested is not allowed, ZwOpenKey returns an error status, and the KeyHandle remains invalid.
ZwOpenKey ignores the security information in the input ObjectAttributes. Access rights for a key object can be set only when the key is created.
Callers of ZwOpenKey must be running at IRQL PASSIVE_LEVEL.
InitializeObjectAttributes, ZwCreateKey, ZwDeleteKey, ZwEnumerateKey, ZwEnumerateValueKey, ZwFlushKey, ZwQueryKey, ZwQueryValueKey, ZwSetValueKey