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. General Programming
  3. C / C++ / MFC
  4. InternetGetConnectedState and LAN

InternetGetConnectedState and LAN

Scheduled Pinned Locked Moved C / C++ / MFC
question
1 Posts 1 Posters 0 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.
  • W Offline
    W Offline
    WernerP
    wrote on last edited by
    #1

    Hi, I am using InternetGetConnectedState to determine, whether a LAN connection exists. IBZHTTP_API LRESULT canConnectLAN() { DWORD dwFlags; InternetGetConnectedState(&dwFlags,0); return LRESULT( 0 < (dwFlags & INTERNET_CONNECTION_LAN) ); } I tested this function on two computers(PC1, PC2), both connected to the same LAN. Both have additionally RAS installed and a proxy exists. The LAN connections are activated. PC1: Return value dwFlags is 56, which is correct, it means INTERNET_CONNECTION_LAN (0x02) INTERNET_CONNECTION_PROXY (0x04) INTERNET_RAS_INSTALLED (0x10) INTERNET_CONNECTION_CONFIGURED (0x40) PC2: Return value dwFlags is 50 which is not enough, it means only INTERNET_RAS_INSTALLED (0x10) INTERNET_CONNECTION_CONFIGURED (0x40) When RAS connections with modem are defined on PC2, dwFlags is correct with respect to RAS, 51: INTERNET_CONNECTION_MODEM (0x01) INTERNET_RAS_INSTALLED (0x10) INTERNET_CONNECTION_CONFIGURED (0x40) What could be the reason, that InternetGetConnectedState does not report the LAN connection on PC2? Thank you Werner

    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