CInternetServer::GetLocalName Method  
 
INT GetLocalName(
  LPTSTR lpszHostName,  
  INT cchHostName  
);
INT GetLocalName(
  CString& strHostName  
);

The GetLocalName method returns the hostname assigned to the local system.

Parameters

lpszHostName
A pointer to the buffer that will contain the hostname. This parameter cannot be NULL. An alternate form of the method accepts a CString argument which will contain the local hostname.
cchHostName
The maximum number of characters that can be copied into the address buffer.

Return Value

If the method succeeds, the return value is the length of the hostname. If the method fails, the return value is INET_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: cswsock11.h
Import Library: cswskv11.lib
Unicode: Implemented as Unicode and ANSI versions

See Also

GetClientAddress, GetLocalAddress