gethostname The Windows Sockets gethostname function returns the standard host name for the local machine.
VB4-32,5,6
Declare Function gethostname Lib "WSOCK32" (ByVal szHost As String, ByVal dwHostLen As Long) As Long |
VB.NET
System.Net.Dns.GetHostName |
Operating Systems Supported |
Requires Windows Sockets 1.1 or later |
- name
[out] A pointer to a buffer that receives the local host name.
- namelen
[in] The length of the buffer. |
If no error occurs, gethostname returns zero. Otherwise, it returns SOCKET_ERROR and a specific error code can be retrieved by calling WSAGetLastError. |
|