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

# LsaEnumerateTrustedDomains(3w)

## NAME

**LsaEnumerateTrustedDomains** (ADVAPI32.@)

## SYNOPSIS

NTSTATUS LsaEnumerateTrustedDomains\
  (\
   IN LSA\_HANDLE              *PolicyHandle*,\
   IN PLSA\_ENUMERATION\_HANDLE *EnumerationContext*,\
   OUT PVOID\*                 *Buffer*,\
   IN ULONG                   *PreferredMaximumLength*,\
   OUT PULONG                 *CountReturned*\
  )

## DESCRIPTION

Returns the names and SIDs of trusted domains.

## PARAMS

*PolicyHandle* **\[In\]**  Handle to a Policy object.

*EnumerationContext* **\[In\]**  Pointer to an enumeration handle.

*Buffer* **\[Out\]**  Contains the names and SIDs of trusted domains.

PreferredMaximumLength**\[In\]**  Preferred maximum size in bytes of *Buffer*.

*CountReturned* **\[Out\]**  Number of elements in *Buffer*.

## RETURNS

**Success:** **STATUS\_SUCCESS**, **STATUS\_MORE\_ENTRIES**, **STATUS\_NO\_MORE\_ENTRIES**

**Failure:** **NTSTATUS** code.

## NOTES

LsaEnumerateTrustedDomains can be called multiple times to enumerate all trusted domains.

## IMPLEMENTATION

Declared in **"ntsecapi.h"**.

Implemented in **"dlls/advapi32/lsa.c"**.

Debug channel **"advapi"**.
