I am modifying an open source code that scans for Wireless signals in the vicinity. The program code goes like this:
#pragma comment(lib, "wlanapi.lib")
#include <stdio.h>
#include <windows.h>
#include <wlanapi.h>
VOID WlanNotification(WLAN_NOTIFICATION_DATA *wlanNotifData,VOID *p)
{
if(wlanNotifData->NotificationCode == wlan_notification_acm_scan_complete)
{
bWait = false;
}
else if(wlanNotifData->NotificationCode == wlan_notification_acm_scan_fail)
{
printf("Scanning failed with error: %x\n", wlanNotifData->pData);
bWait = false;
......
I wanted to know how I can compile the source code that has wlanapi.h and windows.h dependency?
Please note that I want this code to run on Windows (Not Linux). I am coding a Tool for simple windows users that would diagnose their Wifi security for them. The first step is to sense the nearest WiFi APs and their respective Encryption Types. I just want to know how I can compile this code for windows platform that has a 'windows.h' or 'wlanapi.h' dependency, in the easiest possible way.