CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2003
    Location
    BeiJing China
    Posts
    290

    Smile How can I get the my PC IP address ?

    Hi...

    I use VC++6.0, xp os.
    I want to get my pc address by program, how to do it ?

    Every suggestions is appreciated !

    wxuf
    Waiting OFFERS from CMU, UMass, UC Davis, OSU
    Mail to me

  2. #2
    Join Date
    Dec 2002
    Location
    St.Louis MO, USA
    Posts
    672

    Re: How can I get the my PC IP address ?

    You can use gethostname and then gethostbyname to get ur system IP address. Take a look at Platform SDK: Windows Sockets 2
    A Person who is polite is given goodness and a person who is away from Politeness is away from Goodness.

    NAUMAAN

  3. #3
    Join Date
    Feb 2003
    Location
    Bangalore, India
    Posts
    1,354

    Re: How can I get the my PC IP address ?

    Additionally look at the following FAQ...
    Even if our suggestions didn't help, please post the answer once you find it. We took the effort to help you, please return it to others.

    * While posting code sections please use CODE tags
    * Please check the codeguru FAQ and do a little search to see if your question have been answered before.
    * Like a post, Rate The Post
    * I blog: Network programming, Bible

    I do all things thru CHRIST who strengthens me

  4. #4
    Join Date
    Sep 2005
    Posts
    3

    Wink how to get other's pc ip address through LAN

    I'm using JAVA as the programming language. I connect 3 pc through hub. 1 pc is the main pc to control the other 2. Can you teach me how to get the 2 pc's ip address from the main pc. Is it using gethostname or gethostnameby?

    Your answer is really appreciated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured