|
-
Aug 16th, 2008, 08:26 AM
#1
Thread Starter
New Member
I need help on using API to get LAN IP adresses
Hi all, can you use API to get the IP addresses of other computers on a LAN network? I'll like to know the code.
Can you also assist me with a code that will indicate if a computer is connected to a network via LAN cable?
THANKS!!!
-
Aug 16th, 2008, 03:09 PM
#2
Re: I need help on using API to get LAN IP adresses
in response to your first question - Do you mean get the IP of every machine on the network or do you mean get the IP of specific PCs?
in response to your second question - do you mean you just want to check if the machine is actually connected to the network or do you mean you want to know if they are connected via ethernet cable or wireless?
Also, what research and code have you got so far?
-
Aug 22nd, 2008, 01:22 PM
#3
Thread Starter
New Member
Re: I need help on using API to get LAN IP adresses
Hi Chris, I mean a code that will get the IP address of every machine on the network.
Secondly, a code that will check if the machine is actually connected to a network via LAN only.
I'm kinda new in the VB6 game. I did some research and found out something about APIs. Haven't yet got a working code.
Can u help?
-
Aug 23rd, 2008, 03:16 AM
#4
Re: I need help on using API to get LAN IP adresses
You have another option,
You can cmd the command and catch the out put in to a text file.
CMD> NET view > C:\computers.txt
You need to excute this form your vb app.
*net view or some command, i forget 
Edited : arp -a is the command it look like. i dont have a network here to check.
Last edited by Fazi; Aug 23rd, 2008 at 05:11 AM.
-
Aug 23rd, 2008, 04:55 AM
#5
Re: I need help on using API to get LAN IP adresses
 Originally Posted by Souldx7
Hi Chris, I mean a code that will get the IP address of every machine on the network.
Secondly, a code that will check if the machine is actually connected to a network via LAN only.
I'm kinda new in the VB6 game. I did some research and found out something about APIs. Haven't yet got a working code.
Can u help?
Ah sorry I didnt realise you were using VB6. One question though, if you are new to VB6, why not just start with VB.NET? The only reason anyone uses VB6 now is because they have spent years using it... or they have to support a system that was already written in VB6. If your not in either of those situations then I would recommend learning VB.NET instead.
-
Aug 25th, 2008, 11:13 AM
#6
Thread Starter
New Member
Re: I need help on using API to get LAN IP adresses
Thanks, but I'm not that new to vb6. I've already gone as far as studying API but I have NO idea how to call them or code them.
About using cmd, how do i link it from VB, my expertise ain't that great. I just know the basics.
-
Aug 26th, 2008, 02:20 AM
#7
Re: I need help on using API to get LAN IP adresses
yah, you just output the cmd to a text file and read form it.
ie.
Code:
Private Sub Command1_Click()
Call Shell(Environ("COMSPEC") & " /c ipconfig > c:\output.txt", vbHide)
End Sub
check this thread for all CMD Shellings.
http://www.vbforums.com/archive/index.php/t-364219.html
BTW, To list all ip's in a network in command problem, i am still forget the comaand. so pls post a question in our general computer section.
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
|