Search code examples
c++wifiwlanapi

Check for EAP credentials issue


I want to check if EAP credentials are present (stored in the registry or not) when connecting to the Enterprise wireless network from the imported profile using my program. I use this method: WlanSetProfileEapXmlUserData for storing the user credentials. The imported profile only stores the wireless network xml data and not the username and password. So, what method from Wlan API should I use to verify that the user credentials are present for the specific wireless profile? I only need information. Thanks.


Solution

  • I have fixed the issue by checking for wlan_notification_acm_network_available code, from the MS docs (https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/ms706902(v=vs.85)):

    The wlan_notification_acm_network_available notification is sent when all of the following conditions occur:

    • The wireless service finds connectable networks after a scan
    • The interface is in the disconnected state;
    • There is no compatible auto-connect profile that the wireless service can use to connect.

    After a while when connecting to EAP profile without the user credentials it gets wlan_notification_acm_network_available code. Now the application intercepts it and send a notification to enter the user credentials. The issue is resolved.