ADO DOT NET
Centurion
- Joined
- Dec 20, 2006
- Messages
- 160
Hi
I have this simple .NET VB command which will return the computer name:
I want to know how should I convert it to VB6?
I mean getting the name in VB6?
I found something that won't work:
I have this simple .NET VB command which will return the computer name:
Visual Basic:
System.Net.Dns.GetHostName().Trim(".")
I mean getting the name in VB6?
I found something that won't work:
Visual Basic:
Public Declare Function gethostbyname Lib "wsock32" (ByVal szHost As String) As Long
Dim localhost As String
gethostbyname (localhost)
localhost = localhost.Trim(".")