|
|
| INT
InetGetHostName(
|
|
|
DWORD
dwAddress, |
|
|
|
LPTSTR
lpszHostName, |
|
|
|
INT cchHostName |
|
| );
|
The InetGetHostName function performs a reverse lookup,
returning the hostname associated with a given IP address.
Parameters
- dwAddress
- An unsigned long integer which specifies the numeric IP address
that should be resolved into a hostname.
- lpszHostName
- A pointer to the buffer that will contain the
hostname.
- cchHostName
- The maximum number of characters that can be copied into the
address buffer.
Return Value
If the function succeeds, the return value is the length of the
hostname. If the function fails, the return value is INET_ERROR. To
get extended error information, call InetGetLastError.
Remarks
If the library must perform a DNS lookup to resolve the
hostname, the calling thread will block.
Requirements
Client: Requires Windows Vista, Windows XP or Windows
2000 Professional.
Server: Requires Windows Server 2008, Windows Server 2003 or
Windows 2000 Server.
Header: Include cswsock6.h.
Library: Use cswskav6.lib.
Unicode: Implemented as Unicode and ANSI versions.
See Also
InetGetHostAddress,
InetGetLocalAddress,
InetGetLocalName, InetGetPeerAddress
|
|