The GetHostName copies the name of the current host into
the specified buffer.
Parameters
lpszHostName
The buffer that will contain the name of the
current remote host. This buffer should be at least 64 characters
in length.
cbHostName
The maximum number of characters that may be copied into the
buffer, including the terminating null character.
Return Value
If the method succeeds, the return value is the length of the host
name string. If the return value is zero, this indicates that no
remote host has been specified. If the method fails, the return value
is ICMP_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: csicmv12.lib Unicode: Implemented as Unicode and ANSI versions