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

The GetLocalName method returns the local host name.

Parameters

lpszLocalName
Pointer to a 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

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

See Also