locked
Getting weird WLAN_AVAILABLE_NETWORK_FLAGS value from WlanGetAvailableNetworkList() RRS feed

  • Question

  • I am working on software that is supposed to check a wireless network connection to a DSLR camera.

    When I call WlanGetAvailableNetworkList(), the entry for my local wifi network looks fine. (dwFlags = 3. WLAN_AVAILABLE_NETWORK_CONNECTED and WLAN_AVAILABLE_NETWORK_HAS_PROFILE) But the entry for the camera has dwFlags of 258.

    In wlanapi.h, I found:
    // available network flags
    #define WLAN_AVAILABLE_NETWORK_CONNECTED                      0x00000001  // This network is currently connected
    #define WLAN_AVAILABLE_NETWORK_HAS_PROFILE                     0x00000002  // There is a profile for this network
    #define WLAN_AVAILABLE_NETWORK_CONSOLE_USER_PROFILE     0x00000004  // The profile is the active console user's per user profile
    

    Assuming dwFlags can contain more than one of these values, it still shouldn't be 258. Can anyone tell me where this value might be coming from?

    Thanks.

    What is "Profile signature"?

    Tuesday, August 18, 2020 8:42 PM

Answers

  • Hi,

    Thank you for posting here.

    >>Assuming dwFlags can contain more than one of these values, it still shouldn't be 258. Can anyone tell me where this value might be coming from?

    258 corresponds to 0x00000102.

    #define WLAN_AVAILABLE_NETWORK_AUTO_CONNECT_FAILED          0x00000100  // This network failed to connect

    As far as I'm concerned, those flags look like they are intended to be combined with bitwise-or.  258 is a combination of 0x00000100 and 0x00000002 , in other words, both  WLAN_AVAILABLE_NETWORK_AUTO_CONNECT_FAILED and WLAN_AVAILABLE_NETWORK_HAS_PROFILE are set.

    Best Regards,

    Jeanine Zhang


    "Visual c++" forum will be migrating to a new home on Microsoft Q&A !
    We invite you to post new questions in the "Developing Universal Windows apps" forum’s new home on Microsoft Q&A !
    For more information, please refer to the sticky post.

    • Marked as answer by AngryJ Wednesday, August 19, 2020 12:25 PM
    Wednesday, August 19, 2020 3:07 AM