DsAddressToSiteNames
The DsAddressToSiteNames function returns the site names corresponding the addresses specified.
DWORD DsAddressToSiteNames(
LPCSTR ComputerName,
DWORD EntryCount,
PSOCKET_ADDRESS SocketAddresses,
LPSTR **SiteNames
);
Parameters
- ComputerName
- [in] (Optional) Pointer to a null-terminated string that specifies the name of the remote server to process this function. This parameter must be the name of a domain controller. A non-domain controller can call this function by calling DsGetDcName to find the domain controller.
- EntryCount
- [in] The number of addresses to convert.
- SocketAddresses
- [in] This parameter specifies an EntryCount element array of addresses to convert. Each address in this array must be of the type, AF_INET.
- **SiteNames
- [out] This parameter returns an array of pointers to the specified site names. EntryCount entries are returned as well. An entry will be returned as NULL if the corresponding address does not map to any known site or if the address entry is not of the proper form. The returned array must be freed using NetApiBufferFree.
Return Values
If the function returns the specified site names information, the return value is NO_ERROR.
The function can fail due to memory space and return ERROR_NOT_ENOUGH_MEMORY, which indicates there is insufficient memory to complete the operation.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Dsgetdc.h.
Library: Included as a resource in Ntdsapi.dll.
Unicode: Implemented as Unicode and ANSI versions on Windows 2000.
See Also
Directory Service Functions, DsGetDcName, NetApiBufferFree