|
INT GetHostName( |
|
LPTSTR lpszHostName, |
|
|
INT cbHostName |
|
); |
INT GetHostName( |
|
CString& strHostName |
|
); |
The GetHostName copies the name of the current host into
the specified buffer.
Parameters
- lpszHostName
- A pointer to 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 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: cstools11.h
Import Library: csicmv11.lib
Unicode: Implemented as Unicode and ANSI versions
See Also
FormatAddress,
GetHostAddress,
ResolveAddress,
SetHostAddress,
SetHostName
|
|