Directory Services

DsGetDcSiteCoverage

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

DWORD DsGetDcSiteCoverage(
  LPCTSTR ServerName,
  PULONG EntryCount,
  LPTSTR** SiteNames
);

Parameters

ServerName
[in, optional] The null-termnated string value that specifies the name of the remote domain controller.
EntryCount
[out] Pointer to a ULONG value that receives the number of sites covered by the domain controller.
SiteNames
[out] 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 Values

Return Code Description
ERROR_NOT_ENOUGH_MEMORY Insufficient memory to complete the operation.
NO_ERROR The function succeeded.

Requirements

Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Unicode: Implemented as Unicode and ANSI versions.
Header: Declared in Dsgetdc.h.
Library: Use Netapi32.lib.

See Also

NetApiBufferFree, DsGetSiteName, Directory Service Functions