How to View Open Connections

This is a discussion on How to View Open Connections within the Windows Programming forums, part of the Platform Specific Boards category; Is there a way that you can view which connections are open and closed through C? Im on Windows 2000 ...

  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    54

    How to View Open Connections

    Is there a way that you can view which connections are open and closed through C? Im on Windows 2000 and would like to know when I become disconnected from different websites. Thanks ahead.

  2. #2
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    Posts
    638
    system("netstat ...")

  3. #3
    Registered User
    Join Date
    Feb 2005
    Posts
    54
    thanks. Is there a way to store the result to a variable instead of printing to a console?
    Last edited by maththeorylvr; 04-29-2005 at 08:44 PM.

  4. #4
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544

  5. #5
    Registered User
    Join Date
    Feb 2005
    Posts
    54
    Quote Originally Posted by anonytmouse
    I have the dlls, and the required libraries, and included IPhlprapi.h, and i still get an undefined reference to GetTcpTable when trying to link it. Any idea what could be wrong?

  6. #6
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,855
    You have linked to the library Iphlpapi.lib? (not just included its header)
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  7. #7
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    You also need to link to the library Iphlpapi.lib.

  8. #8
    Registered User
    Join Date
    Feb 2005
    Posts
    54
    any idea how to do that?

  9. #9
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    Whats your compiler?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Open file name object
    By JJFMJR in forum Windows Programming
    Replies: 3
    Last Post: 09-14-2007, 05:44 PM
  2. Open Source Licenses
    By Mario F. in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 10-10-2006, 08:53 PM
  3. problem with the open dialog box
    By stallion in forum Windows Programming
    Replies: 13
    Last Post: 02-19-2003, 07:28 AM
  4. how do u open a folder?
    By nicola_diaz in forum C++ Programming
    Replies: 3
    Last Post: 11-24-2001, 03:22 PM
  5. Ghost in the CD Drive
    By Natase in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 10-12-2001, 05:38 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21