Solved

Winsock IP address query (multiple)

Posted on 2006-07-20
12
450 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
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 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 50 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 200 total points
ID: 17151823
0
ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

 
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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
base64 decode encode 12 134
Is there a canned solution for a custom genealogy website 2 93
Zip Folders Using Chilkat Routines 1 41
Formula problem with Excel attachment 6 27
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

803 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