Getting weird WLAN_AVAILABLE_NETWORK_FLAGS value from WlanGetAvailableNetworkList()

JN Lifetouch 21 Reputation points
2020-08-18T20:49:08.02+00:00

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.

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,690 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,724 questions
{count} votes

Accepted answer
  1. Castorix31 82,211 Reputation points
    2020-08-19T06:15:58.533+00:00

    All flags are :

    // 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
    #define WLAN_AVAILABLE_NETWORK_INTERWORKING_SUPPORTED       0x00000008  // Interworking is supported
    #define WLAN_AVAILABLE_NETWORK_HOTSPOT2_ENABLED             0x00000010  // Hotspot2 is enabled
    #define WLAN_AVAILABLE_NETWORK_ANQP_SUPPORTED               0x00000020  // ANQP is supported
    #define WLAN_AVAILABLE_NETWORK_HOTSPOT2_DOMAIN              0x00000040  // Domain network 
    #define WLAN_AVAILABLE_NETWORK_HOTSPOT2_ROAMING             0x00000080  // Roaming network
    #define WLAN_AVAILABLE_NETWORK_AUTO_CONNECT_FAILED          0x00000100  // This network failed to connect
    

    So 258 = WLAN_AVAILABLE_NETWORK_HAS_PROFILE | WLAN_AVAILABLE_NETWORK_AUTO_CONNECT_FAILED

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful