[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Winsock IP address query (multiple)

Posted on 2006-07-20
12
Medium Priority
?
483 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
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.
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.
Suggested Courses

649 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