|
-
Aug 31st, 2000, 01:00 PM
#1
Thread Starter
New Member
I'm currently working on a program to communicate across the internet, but in order to do so, I need to be able to detect my IP address. As I am on a LAN, when I try to do this, it returns my LAN IP, whereas I need to get my internet IP. Is there a way to do this?
Thanks in advance,
Az.
-
Aug 31st, 2000, 05:06 PM
#2
Fanatic Member
Place the winsock control on thr form and a label then add this code.
Code:
Label1.Caption = Winsock1.LocalIP
Hope that helps,
D!m
-
Aug 31st, 2000, 05:43 PM
#3
Thread Starter
New Member
I'm currently using the winsock control to communicate, and unfortunately, when you use the localip property, it returns the IP from the LAN, rather than your internet connection.
-
Sep 1st, 2000, 02:48 AM
#4
You have to start the winsock control after you are connected to the internet to get the Internet IP I think.
I was trying to get the same info and that was the easiest way I found, definately not the best though.
-
Sep 1st, 2000, 01:56 PM
#5
Thread Starter
New Member
Unfortunately not, I have started the program many times after connecting to the internet, but with no luck.
-
Sep 5th, 2000, 11:49 PM
#6
New Member
hope it helps
While searching for the answer to the same problem, I came across a link to the following msn knowledge base page:
http://support.microsoft.com/support.../q160/2/15.asp
It has a loop in it to account for multi-homed addresses.
Dip
-
Sep 7th, 2000, 01:52 PM
#7
Thread Starter
New Member
Thanks, Dip, that code did exactly what I was looking for.
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
|