Undocumented functions of NTDLL

2OOO, 21 December


NtQueryDirectoryObject
NtQueryDirectoryObject

NTSYSAPI 
NTSTATUS
NTAPI

NtQueryDirectoryObject(
IN HANDLE DirectoryObjectHandle, OUT POBJDIR_INFORMATION DirObjInformation, IN ULONG BufferLength, IN BOOLEAN GetNextIndex, IN BOOLEAN IgnoreInputIndex, IN OUT PULONG ObjectIndex, OUT PULONG DataWritten OPTIONAL );



DirectoryObjectHandle
Handle to Directory Object opened with DIRECTORY_QUERY access.

DirObjInformation
Pointer to OBJDIR_INFORMATION structure. Warning: structure has variable length dependly to length of object name.
To test for required length of buffer use DataWritten parameter.

BufferLength
Length of DirObjInformation buffer.

GetNextIndex
Decide of ObjectIndex parameter usage on output.
  If FALSE:       ObjectIndex is number of object in Object Directory.
  If TRUE:        ObjectIndex is index of next object to quered object (see below) in Object Directory.

IgnoreInputIndex
Decide how to use ObjectIndex on function input.
  If FALSE:       ObjectIndex point to ULONG index of object in Object Directory.
  If TRUE:        ObjectIndex input value is ignored. Function always return informations about first object in Object Directory.

ObjectIndex
Pointer to ULONG value described above.

DataWritten
Pointer to ULONG value receiving required / written buffer size. This parameter is optional.



Documented by:
Tomasz Nowak



Requirements:
Library: ntdll.lib


See also:
NtCreateDirectoryObject
NtOpenDirectoryObject
OBJDIR_INFORMATION