Re: How to find my IPAddress

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Phil Frisbie, Jr. (phil_at_hawksoft.com)
Date: 02/26/05


Date: Fri, 25 Feb 2005 16:06:11 -0800

Bishman wrote:

> Sorry if this question is tediously basic for this forum but I need to find
> the IP address for my local machine.
>
> I have sniffed around "getaddressbyname".
>
> It looks a bit long winded. Before I dive in is this the API I need ?

Use gethostname() followed by gethostbyname()

> Cheers.....

-- 
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com


Relevant Pages

  • Re: Getting the domain name
    ... chop the first node off. ... And at any rate if gethostname doesn't provide a domain name that's not ...
    (comp.unix.programmer)
  • Re: Finding local host ip address
    ... Keep in mind that your local machine can have more than one interface. ... A good quality software will let the user to select the host interface, ... > gethostname() ...
    (microsoft.public.win32.programmer.networks)