• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 489
  • Last Modified:

Winsock IP address query (multiple)

I want to make a VB6 app that can
a) show my computer name and IP Address and
b) show IP Address and comp names of other PCs on the network
c) query a single comp name/IP address as typed in by user

A and C should be easy enough to figure out, but what about B?
do i need an instance of this program running on connected PCs to do it or can i use something else, even if i wasn't connected to LAN when system booted up - connect to sitch later?

solution + VB6 coding would be appreciated
(also, sometimes my IP address appears as real IP address (168.192.100.1) and sometimes as lookback adapter (127.0.0.1) depending on what pc i run program on. Why is it so and how can i fix it?)

Thanks - Ryan R
0
Ryan_R
Asked:
Ryan_R
2 Solutions
 
Ryan_RAuthor Commented:
so if i clicked a button on my form a list box would be filled with all the IP addresses and names on my network
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
The easiest way to retrieve the IP address assigned to the local machine during an Internet session is by means of the LocalIP property of the Internet Transfer Control:
MsgBox "IP address= " & Winsock1.LocalIp

using API:
http://www.developerfusion.co.uk/show/1851/

Get the computer name:
http://www.veign.com/vrc_codeview.asp?type=app&id=7

get all the computer names in your domain:
http://www.freevbcode.com/ShowCode.Asp?ID=703

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Ryan_RAuthor Commented:
ok so far so good.
how about using this on different networks?
ie Domain, Workgroup, and Novell Client/Server network on top of Win XP?
0
 
Ryan_RAuthor Commented:
saved links to HDD - will review them when i have more time
until later, ryan
0
 
callrsCommented:
Hi Ryan. Please see http://www.geocities.com/callrs/eeDeleted.htm & reply by email if you can get cached copy. Thanks.
0
 
Ryan_RAuthor Commented:
can't get geocities at school: banned, will try later, thanks
0
 
Ryan_RAuthor Commented:
sorry i've completey forgotton about this post guys, will endeavour to try out solutions soon and accept an answer.
0
 
Ryan_RAuthor Commented:
http://www.freevbcode.com/ShowCode.Asp?ID=703

i have tried this example with no success, when i use the listbox.add command or any command to view the data (ie msgbox) i get the error Type Mismatch.

any ideas
0
 
Ryan_RAuthor Commented:
and while im at it already was using winsock for local ip as stated somewhat in original question

http://www.devcity.net/forums/faq.asp?tid=1712 (as found in http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21858688.html)
tried this also without success - the error i belive being on the line of code where it reffers to something.ADODB or something - was i supposed to add a reference or something in my project for this example

if i can get your ideas on this and get it working then i can easily accept an answer here - thanks everyone
0
 
Ryan_RAuthor Commented:
ok i have had limited success with a few suggestions now so i think it's feeding time at the EE zoo (yippee)
thanks for all your help
0
 
Ryan_RAuthor Commented:


it's not possible to list PCs that are not in my workgroup, is it?

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now