Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Article Writing
  4. Detecting a Net connection

Detecting a Net connection

Scheduled Pinned Locked Moved Article Writing
question
3 Posts 3 Posters 6 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    How can you easily test for an active TCP connection (either LAN or DialUp). I would like to be able to check this in my code, so I can then connect or offer the user an option to dial-up - the same as in IE when it starts up. Surely there is a simple way to do this?

    P S 2 Replies Last reply
    0
    • L Lost User

      How can you easily test for an active TCP connection (either LAN or DialUp). I would like to be able to check this in my code, so I can then connect or offer the user an option to dial-up - the same as in IE when it starts up. Surely there is a simple way to do this?

      P Offline
      P Offline
      Paolo Messina
      wrote on last edited by
      #2

      Check out InternetGetConnectedState() on MSDN. Cheers, Paolo.

      1 Reply Last reply
      0
      • L Lost User

        How can you easily test for an active TCP connection (either LAN or DialUp). I would like to be able to check this in my code, so I can then connect or offer the user an option to dial-up - the same as in IE when it starts up. Surely there is a simple way to do this?

        S Offline
        S Offline
        skfnmuisl dmufa oi
        wrote on last edited by
        #3

        You can check for open PPP-(Point To Point Protocol) connections by calling RasEnumConnections() (see help for params). The function will return the number of active connections. If there is none, you can dial up one by calling RasDial(). Hope this will help you. --- Pseudocode is code to demonstrate a concept, not designed to be run. Like certain Microsoft software. (Thanks a lot who ever wrote Robert's Perl Tutorial)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups