DsGetDcSiteCoverageA function (dsgetdc.h)

The DsGetDcSiteCoverage function returns the site names of all sites covered by a domain controller.

Syntax

DSGETDCAPI DWORD DsGetDcSiteCoverageA(
  [in, optional] LPCSTR ServerName,
  [out]          PULONG EntryCount,
  [out]          LPSTR  **SiteNames
);

Parameters

[in, optional] ServerName

The null-terminated string value that specifies the name of the remote domain controller.

[out] EntryCount

Pointer to a ULONG value that receives the number of sites covered by the domain controller.

[out] SiteNames

Pointer to an array of pointers to null-terminated strings that receives the site names. To free the returned buffer, call the NetApiBufferFree function.

Return value

This function returns DSGETDCAPI DWORD.

Remarks

Note

The dsgetdc.h header defines DsGetDcSiteCoverage as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header dsgetdc.h
Library Netapi32.lib
DLL Netapi32.dll

See also

Directory Service Functions

DsGetSiteName

NetApiBufferFree