locked
How do I know the network adapter whether is enable? RRS feed

  • Question

  • How do I know the network adapter whether is enable? 

    Determine whether the user disabled the network adapter.

    thanks...

    Friday, October 12, 2012 3:52 AM

Answers

  • You can call NetworkInformation::GetConnectionProfiles to get the list of connections for the local machine. You can look at the ConnectionProfile's GetNetworkConnectivityLevel to find if the connection is currently connected.

    If the user disabled the adapter then it won't be available to your app at all.

    --Rob

     

    • Marked as answer by Min ZhuMember Wednesday, October 24, 2012 9:19 AM
    Friday, October 12, 2012 3:01 PM
    Moderator