DsListDomainsInSite function
The DsListDomainsInSite function lists all the domains in a site.
Syntax
DWORD DsListDomainsInSite( _In_ HANDLE hDs, _In_ LPTSTR site, _Out_ PDS_NAME_RESULT *ppDomains );
Parameters
- hDs [in]
-
Contains a directory service handle obtained from either the DSBind or DSBindWithCred function.
- site [in]
-
Pointer to a null-terminated string that specifies the site name. This string is taken from the list of site names returned by the DsListSites function.
- ppDomains [out]
-
Pointer to a pointer to a DS_NAME_RESULT structure that receives the list of domains in the site. To free the returned structure, call the DsFreeNameResult function.
Return value
If the function returns a list of domains, the return value is NO_ERROR. If the function fails, the return value can be one of the following error codes.
| Return code | Description |
|---|---|
|
A parameter is invalid. |
|
There is insufficient memory available to complete the operation. |
Remarks
Individual name conversion errors are reported in the returned DS_NAME_RESULT structure.
Requirements
|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server | Windows 2000 Server [desktop apps only] |
|
Redistributable | Active Directory Client Extension on Windows NT 4.0 and Windows Me/98/95 |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | DsListDomainsInSiteW (Unicode) and DsListDomainsInSiteA (ANSI) |
See also
Send comments about this topic to Microsoft
Build date: 10/26/2012