How to find my IP address 
Author Message
 How to find my IP address

I need to know the IP address i have when i connect to Internet
through Dial up connection. I'm using VB4pro and Win95 and i think
there's a function in winsock.dll but i didn't find anything about
that in my docs. Any of you knows how can i find it (possibly without
using 3rd party ocx)
Thanx in advance

Phelipe de Sterlich
- Computer Service -



Mon, 08 Mar 1999 03:00:00 GMT  
 How to find my IP address

Why don't you just use the utility included with Windows95
at the comman prompt just type winipcfg and select your modem addapter and
it will tell you the IP.


Quote:
> I need to know the IP address i have when i connect to Internet
> through Dial up connection. I'm using VB4pro and Win95 and i think
> there's a function in winsock.dll but i didn't find anything about
> that in my docs. Any of you knows how can i find it (possibly without
> using 3rd party ocx)
> Thanx in advance

> Phelipe de Sterlich
> - Computer Service -




Mon, 08 Mar 1999 03:00:00 GMT  
 How to find my IP address

What i have to do is to find my ip address from within a vb program,
since i must pass it as a statemente for another function...
any ideas?

On 19 Sep 1996 22:09:02 -0700, "Kelly Householder"

Quote:

>Why don't you just use the utility included with Windows95
>at the comman prompt just type winipcfg and select your modem addapter and
>it will tell you the IP.



Thu, 11 Mar 1999 03:00:00 GMT  
 How to find my IP address

Quote:

> What i have to do is to find my ip address from within a vb program,
> since i must pass it as a statemente for another function...
> any ideas?
> On 19 Sep 1996 22:09:02 -0700, "Kelly Householder"

> >Why don't you just use the utility included with Windows95
> >at the comman prompt just type winipcfg and select your modem addapter and
> >it will tell you the IP.

I don't think you should dismiss Householder's suggestion quite so quickly. Just
think of all the programming opportunities for the use of sendkeys. You'd use it
to get the command prompt up, run the winipcfg program and (here's the really
clever bit) do an alt-printscreen to dump the command window to the clipboard,
more sendkeys to start off an ocr program and read the answer from the pasted bitmap.

If you were *really* clever you'd need to determine if there was an ocr program
on the machine and, if not, bring up a web browser to try to find one and download
it and install it, all with sendkeys.

But if you want to be conventional, I suppose there *are* the boring programmatic
interfaces you desire. There are two approaches I can think of. First is by
finding out where it's kept in the registry and by using the registry api
to retrieve it. Second (superior, but harder) is to have a look at gethostname
and gethostbyname (which returns addresses) in the winsock api. That would be
the 'official' way to do it since it's OS independent. But it's hard - you'll
have to fiddle around with hostent structures and the like. You might be lucky
and find a winsock OCX of course, which'll make life *much* easier.

--

Vox (0|+44)1642 216 200  }*|*{  *o|o*  }o|o{ Zetland Buildings, Exchange Square
Fax (0|+44)1642 216 201    o      o      *   Middlesbrough, Cleveland.  TS1 1DE
"Imitation is the sincerest form of being a thieving bastard." -- somebody else



Sun, 21 Mar 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Problems finding correct IP address using WINSOCK Control with 2 network adapters

2. Problems finding correct IP address using WINSOCK Control with 2 network adapters

3. Where can I find the IP-address of my computer in the Registry

4. How to find out IP address behind firewall?

5. Question about finding an IP Address with VB 5/6

6. API to find TCP/IP Address

7. How to find out IP address on PocketPC 2002

8. VB5 HowTo: Find the IP address currently assigned to local machine...

9. How do I find TCP/IP address of machine?

10. how can ActivexDoc find what ip address it was loaded from?

11. VB5 HowTo: Find current IP address assigned to local machine...

12. Help !! How do I find Dynamic IP address of a friend in VB

 

 
Powered by phpBB® Forum Software