CDnsClient::GetLocalDomain Method  
 
INT GetLocalDomain(
  LPTSTR lpszDomain,  
  INT nMaxLength  
);

The GetLocalDomain method copies the local domain name into the specified buffer. The value returned is the same value that was set with the SetLocalDomain method. If no local domain name has been set, an empty string is returned.

Parameters

lpszDomain
Pointer to the buffer that is used to store the local domain name. If no local domain name has been set, this buffer will be set to zero length.
nMaxLength
The maximum number of bytes to copy into the buffer, including the null character terminator.

Return Value

If the method succeeds, the return value is the length of the domain name string. A return value of zero indicates that no local domain name has been set. If the method fails, the return value is DNS_ERROR. To get extended error information, call GetLastError.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools11.h
Import Library: csdnsv11.lib
Unicode: Implemented as Unicode and ANSI versions

See Also

RegisterServer, SetLocalDomain