?
Solved

Winsock IP address query (multiple)

Posted on 2006-07-20
12
Medium Priority
?
472 Views
Last Modified: 2013-11-13
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
Comment
Question by:Ryan_R
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
12 Comments
 
LVL 15

Author Comment

by:Ryan_R
ID: 17151725
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
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 200 total points
ID: 17151780
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
 
LVL 12

Accepted Solution

by:
jkaios earned 800 total points
ID: 17151823
0
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
LVL 15

Author Comment

by:Ryan_R
ID: 17153368
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
 
LVL 15

Author Comment

by:Ryan_R
ID: 17153387
saved links to HDD - will review them when i have more time
until later, ryan
0
 
LVL 30

Expert Comment

by:callrs
ID: 17164877
Hi Ryan. Please see http://www.geocities.com/callrs/eeDeleted.htm & reply by email if you can get cached copy. Thanks.
0
 
LVL 15

Author Comment

by:Ryan_R
ID: 17172093
can't get geocities at school: banned, will try later, thanks
0
 
LVL 15

Author Comment

by:Ryan_R
ID: 17220073
sorry i've completey forgotton about this post guys, will endeavour to try out solutions soon and accept an answer.
0
 
LVL 15

Author Comment

by:Ryan_R
ID: 17246273
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
 
LVL 15

Author Comment

by:Ryan_R
ID: 17246294
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
 
LVL 15

Author Comment

by:Ryan_R
ID: 17260566
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
 
LVL 15

Author Comment

by:Ryan_R
ID: 17285643


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

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question