I want to get wlan_intf_opcode_bss_type
using WlanQueryInterface
function.
My code:
PDOT11_BSS_TYPE wlanInterfaceState = NULL;
DWORD wlanInterfaceStateSize = sizeof(wlanInterfaceState);
DWORD interfaceStateResult;
interfaceStateResult = WlanQueryInterface(hClient, &pIfInfo->InterfaceGuid, wlan_intf_opcode_bss_type, NULL, &wlanInterfaceStateSize, (PVOID *)&wlanInterfaceState, NULL);
if (interfaceStateResult != ERROR_SUCCESS) {
qDebug() << "Error";
} else {
qDebug() << wlanInterfaceState;
}
I get hexadecimal values. When I use switch to enumerate on wlanInterfaceState
I get error:
error: C2450: switch expression of type 'PDOT11_BSS_TYPE' is illegal
Update:
DOT11_BSS_TYPE
enumeration syntax from MSDN:
typedef enum _DOT11_BSS_TYPE {
dot11_BSS_type_infrastructure = 1,
dot11_BSS_type_independent = 2,
dot11_BSS_type_any = 3
} DOT11_BSS_TYPE, *PDOT11_BSS_TYPE;
How to use these enumerations on wlanInterfaceState
?
Thanks.