Click here to Skip to main content
15,886,362 members
Articles / Mobile Apps / Windows Mobile

Wifi scanner + custom MFC controls

Rate me:
Please Sign up or sign in to vote.
4.78/5 (29 votes)
30 Jul 2007CPOL16 min read 234.1K   10.2K   146  
A Wifi scanner with custom slider, tab control, buttons and checkboxes
//////////////////////////////////////////////////////////////////////////
//
// CWifiPeek - helper class for Access Point listing
//
// Coded by dzolee
// http://dzolee.blogspot.com
//
//////////////////////////////////////////////////////////////////////////

#include <Windows.h>
#include <winioctl.h>
#include <NtDDNdis.h>
#include <nuiouser.h>

#if _MSC_VER > 1000
#pragma once
#endif

//basid BSSID info struct
struct BSSIDInfo
{
	BYTE BSSID[6];	//mac
	WCHAR SSID[32];
	int RSSI;
	int Channel;
	int Infastructure;
	int Auth;
};

class CWifiPeek
{
public:
	CWifiPeek();
	~CWifiPeek();

	bool GetAdapters(LPWSTR pDest, DWORD &dwBufSizeBytes);
	bool RefreshBSSIDs(LPWSTR pAdapter);
	bool GetBBSIDs(LPWSTR pAdapter, struct BSSIDInfo *pDest, DWORD &dwBufSizeBytes, DWORD &dwReturnedItems);	

private:
	bool OpenDriver();
	void CloseDriver();

	CRITICAL_SECTION m_Lock;
	HANDLE m_hNDUIO;
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Hungary Hungary
I'm a 29-year old software developer. I began programming on a ZX Spectrum many years ago. I've programmed a number of high level languages (Basic, Pascal, C/C++, Java, Php, Perl, C#). I also like reverse-engineering and assembler programming.
I'm interested in handheld devices programming, especially Windows Mobile devices.

Comments and Discussions