---
name: "NtQueryDirectoryObject"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/NtQueryDirectoryObject"
---

# NtQueryDirectoryObject(3w)

## NAME

**NtQueryDirectoryObject** (NTDLL.@)

## SYNOPSIS

NTSTATUS NtQueryDirectoryObject\
  (\
   HANDLE                       *handle*,\
   PDIRECTORY\_BASIC\_INFORMATION *buffer*,\
   ULONG                        *size*,\
   BOOLEAN                      *single\_entry*,\
   BOOLEAN                      *restart*,\
   PULONG                       *context*,\
   PULONG                       *ret\_size*\
  )

## DESCRIPTION

Read information from a namespace directory.

## PARAMS

*handle* **\[In\]**  Handle to a directory object.

*buffer* **\[Out\]**  Buffer to hold the read data.

*size* **\[In\]**  Size of the *buffer* in bytes.

*single\_entry* **\[In\]**  If **TRUE**, return a single entry, if **FALSE**, return as many as fit in the *buffer*.

*restart* **\[In\]**  If **TRUE**, start scanning from the start, if **FALSE**, scan from Context.

*context* **\[In/Out\]**  Indicates what point of the directory the scan is at.

*ret\_size* **\[Out\]**  Caller supplied storage for the number of bytes written (or **NULL**).

## RETURNS

**Success:** **ERROR\_SUCCESS**.

**Failure:** An **NTSTATUS** error code.

## IMPLEMENTATION

Declared in **"winternl.h"**.

Implemented in **"dlls/ntdll/om.c"**.

Debug channel **"ntdll"**.
