|
-
Oct 13th, 2005, 08:53 AM
#1
Thread Starter
New Member
-
Oct 13th, 2005, 05:52 PM
#2
Re: [winsock] Getting the machine name on which I'm connected
Welcome to the forums!
I know you can resolve names on the internet with this:
VB Code:
shell "PING -a xxx.xxx.xxx.xxx"
-
Oct 17th, 2005, 10:20 AM
#3
Fanatic Member
Re: [winsock] Getting the machine name on which I'm connected
now the 'resolve names' i think it only works when working on an internet related project even though i don't understand the.
VB Code:
shell "PING -a xxx.xxx.xxx.xxx"
the get machine name thing, i dont know how to do it from the server but this is the trick i used;
each time the client sends a message to the server it gets the machine name and send along with it.
fine i don't know about others but this seems a little more complicated.
Last edited by modpluz; Oct 17th, 2005 at 11:15 AM.
-
Oct 18th, 2005, 02:10 AM
#4
New Member
Re: [winsock] Getting the machine name on which I'm connected
You need to do a DNS reverse lookup. There is a third party control to do that: http://www.dart.com/dns.asp
Yet, with a bit more searching on the net, you will certainly a free solution via the windows API.
From the command prompt nbtstat -a xxx.xxx.xxx.xxx (Where the xxx are the IP address)
Also from command prompt: nslookup
-
Oct 25th, 2005, 04:32 AM
#5
Thread Starter
New Member
Re: [winsock] Getting the machine name on which I'm connected
Thanks for the answers.
I've found some API funktions
GetHostByName() and
GetHostByIp()
They have also solved my problem
-
Nov 6th, 2005, 10:12 PM
#6
Lively Member
Re: [winsock] Getting the machine name on which I'm connected
hi try this:
VB Code:
dim localpc as string
localpc = environ("computername")
-
Nov 7th, 2005, 09:51 PM
#7
Re: [winsock] Getting the machine name on which I'm connected
 Originally Posted by nvierros
hi try this:
VB Code:
dim localpc as string
localpc = environ("computername")
environ can be changed, dont use it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|