#ifndef _NTOBAPI_H
//
// Directory objects
//
#if (PHNT_MODE != PHNT_MODE_KERNEL)
/**
* Opens an existing directory object.
*
* @param DirectoryHandle A handle to the newly opened directory object.
* @param DesiredAccess An ACCESS_MASK that specifies the requested access to the directory object.
* @param ObjectAttributes The attributes for the directory object.
* @return NTSTATUS Successful or errant status.
* @sa https://learn.microsoft.com/en-us/windows/win32/devnotes/ntopendirectoryobject
*/
NTSYSCALLAPI
NTSTATUS
NTAPI
NtOpenDirectoryObject(
_Out_ PHANDLE DirectoryHandle,
_In_ ACCESS_MASK DesiredAccess,
_In_ POBJECT_ATTRIBUTES ObjectAttributes
);
View code on GitHub
#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwOpenDirectoryObject(
_Out_ PHANDLE DirectoryHandle,
_In_ ACCESS_MASK DesiredAccess,
_In_ POBJECT_ATTRIBUTES ObjectAttributes
);
View code on GitHub
This function is documented in Windows Driver Kit.
Pointer to HANDLE
value representing opened Directory Object.
Access mask. See NtCreateDirectoryObject
for possible values.
Must contains valid Directory Object name.