The GetLocalName method returns the hostname assigned to
the local system.
Parameters
lpszHostName
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: cswsock12.h Import Library: cswskv12.lib Unicode: Implemented as Unicode and ANSI versions