Citation :
HANDLE ndisAccess = CreateFile( deviceName
, GENERIC_READ|GENERIC_WRITE
, FILE_SHARE_READ | FILE_SHARE_WRITE
, NULL , OPEN_EXISTING , FILE_ATTRIBUTE_NORMAL
, (HANDLE)INVALID_HANDLE_VALUE);
if ( ndisAccess != INVALID_HANDLE_VALUE ) { UCHAR QueryBuffer[sizeof(NDISUIO_QUERY_OID) + MAC_ADDR_LEN];
PNDISUIO_QUERY_OID pQueryOid;
pQueryOid = (PNDISUIO_QUERY_OID)&QueryBuffer[0];
pQueryOid->Oid = OID_802_11_BSSID_LIST;
BOOL bRet = DeviceIoControl(
ndisAccess,
IOCTL_NDISUIO_QUERY_OID_VALUE,
(LPVOID) &QueryBuffer[0],
sizeof(QueryBuffer), (LPVOID) &QueryBuffer[0],
sizeof(QueryBuffer),
&dwBytesReturned,
NULL);
}
|