CDnsClient::GetLocalName Method  
 
INT GetLocalName(
  LPTSTR lpszLocalName,  
  INT nMaxLength  
);

The GetLocalName method returns the local host name.

Parameters

lpszLocalName
Pointer to a null-terminated string buffer that will contain the local host name. It is recommended that this buffer be at least 64 characters in size.
nMaxLength
The maximum number of characters that may be copied to the string buffer.

Return Value

If the method succeeds, the return value is the length of the local host name. If the method fails, the return value is DNS_ERROR. To get extended error information, call GetLastError.

Requirements

Client: Requires Windows 7, Windows Vista or Windows XP.
Server: Requires Windows Server 2008 or Windows Server 2003.
Header: Include cstools7.h.
Library: Use csdnsav7.lib.
Unicode: Implemented as Unicode and ANSI versions.

See Also

GetHostByAddress, GetHostByName, GetHostInfo, GetHostServices, GetMailExchange, GetRecord