How to query 802.11 OIDs from NDIS

Posted: 05-12-2005, 06:33 PM
Hi all,

I have written a simple application in which I open the handle to file
NDISUIO_DEVICE_NAME and then use IOCTL_NDISUIO_QUERY_OID_VALUE in the call
to DeviceIOControl() to query different 802.11 OIDs like OID_802_11_SSID,
OID_802_11_RSSI etc etc and some other OIDs like OID_GEN_RCV_OK,
OID_GEN_XMIT_OK. The sample code is shown below:

BOOL MyClass::IOQueryOID(HANDLE hNdisUio, PTCHAR adapter_name, NDIS_OID oid,
LPVOID pData, int length)
{
DWORD dwBytesReturned = 0;
PNDISUIO_QUERY_OID pQOid=NULL;
DWORD dwQueryOidBufferSize = sizeof(NDISUIO_QUERY_OID) + length;

pQOid = (PNDISUIO_QUERY_OID) new BYTE[dwQueryOidBufferSize];
if (!pQueryOid)
{
return false;
}

pQueryOid->Oid = oid;
pQueryOid->ptcDeviceName = adapter_name;

if(!DeviceIoControl(hNdisUio,
IOCTL_NDISUIO_QUERY_OID_VALUE,
pQueryOid,
dwQueryOidBufferSize,
pQueryOid,
dwQueryOidBufferSize,
&dwBytesReturned,
0))
{
delete [] pQueryOid;
return false;
}

if(pData != NULL && length > 0)
memcpy(pData, &pQueryOid->Data[0], (dwBytesReturned < length) ?
dwBytesReturned : length);

delete [] pQueryOid;
return true;
}

But now i want to open file DD_NDIS_DEVICE_NAME and want to query same
OIDs..how should i do this?

Thanks,

Arsalan


Reply With Quote

Responses to "How to query 802.11 OIDs from NDIS"

Arkady Frenkel
Guest
Posts: n/a
 
Re: How to query 802.11 OIDs from NDIS
Posted: 05-13-2005, 10:04 AM
If that device support those you can try
http://support.microsoft.com/default...;en-us;Q304296
Arkady
"Arsalan Ahmad" <arsal__@hotmail.com> wrote in message
news:u1LcCjxVFHA.3620@TK2MSFTNGP09.phx.gbl...
> Hi all,
>
> I have written a simple application in which I open the handle to file
> NDISUIO_DEVICE_NAME and then use IOCTL_NDISUIO_QUERY_OID_VALUE in the call
> to DeviceIOControl() to query different 802.11 OIDs like OID_802_11_SSID,
> OID_802_11_RSSI etc etc and some other OIDs like OID_GEN_RCV_OK,
> OID_GEN_XMIT_OK. The sample code is shown below:
>
> BOOL MyClass::IOQueryOID(HANDLE hNdisUio, PTCHAR adapter_name, NDIS_OID
> oid, LPVOID pData, int length)
> {
> DWORD dwBytesReturned = 0;
> PNDISUIO_QUERY_OID pQOid=NULL;
> DWORD dwQueryOidBufferSize = sizeof(NDISUIO_QUERY_OID) + length;
>
> pQOid = (PNDISUIO_QUERY_OID) new BYTE[dwQueryOidBufferSize];
> if (!pQueryOid)
> {
> return false;
> }
>
> pQueryOid->Oid = oid;
> pQueryOid->ptcDeviceName = adapter_name;
>
> if(!DeviceIoControl(hNdisUio,
> IOCTL_NDISUIO_QUERY_OID_VALUE,
> pQueryOid,
> dwQueryOidBufferSize,
> pQueryOid,
> dwQueryOidBufferSize,
> &dwBytesReturned,
> 0))
> {
> delete [] pQueryOid;
> return false;
> }
>
> if(pData != NULL && length > 0)
> memcpy(pData, &pQueryOid->Data[0], (dwBytesReturned < length) ?
> dwBytesReturned : length);
>
> delete [] pQueryOid;
> return true;
> }
>
> But now i want to open file DD_NDIS_DEVICE_NAME and want to query same
> OIDs..how should i do this?
>
> Thanks,
>
> Arsalan
>
>

Reply With Quote
Arsalan Ahmad
Guest
Posts: n/a
 
Re: How to query 802.11 OIDs from NDIS
Posted: 05-17-2005, 01:17 PM
Hi,

I am developing an application on Pocket PC 2003 which uses NDISUIO to query
different oids like OID_802_11_FRAGMENTATION_THRESHOLD, OID_11_RTS_THRESHOLD
etc. However I am getting Not Supported for these OIDs when I query for the
supported OIDs from NDISUIO driver. But even then if I need to query these
OIDs, then please tell me what should i do? Is there any other interface
available for this? Or can I query the NIC driver directly rather than using
the NDISUIO driver? My application runs on Pocket PC 2003.

Thanks,

Arsalan
"Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message
news:OhUtXJ5VFHA.4056@TK2MSFTNGP15.phx.gbl...
> If that device support those you can try
> http://support.microsoft.com/default...;en-us;Q304296
> Arkady
> "Arsalan Ahmad" <arsal__@hotmail.com> wrote in message
> news:u1LcCjxVFHA.3620@TK2MSFTNGP09.phx.gbl...
>> Hi all,
>>
>> I have written a simple application in which I open the handle to file
>> NDISUIO_DEVICE_NAME and then use IOCTL_NDISUIO_QUERY_OID_VALUE in the
>> call to DeviceIOControl() to query different 802.11 OIDs like
>> OID_802_11_SSID, OID_802_11_RSSI etc etc and some other OIDs like
>> OID_GEN_RCV_OK, OID_GEN_XMIT_OK. The sample code is shown below:
>>
>> BOOL MyClass::IOQueryOID(HANDLE hNdisUio, PTCHAR adapter_name, NDIS_OID
>> oid, LPVOID pData, int length)
>> {
>> DWORD dwBytesReturned = 0;
>> PNDISUIO_QUERY_OID pQOid=NULL;
>> DWORD dwQueryOidBufferSize = sizeof(NDISUIO_QUERY_OID) + length;
>>
>> pQOid = (PNDISUIO_QUERY_OID) new BYTE[dwQueryOidBufferSize];
>> if (!pQueryOid)
>> {
>> return false;
>> }
>>
>> pQueryOid->Oid = oid;
>> pQueryOid->ptcDeviceName = adapter_name;
>>
>> if(!DeviceIoControl(hNdisUio,
>> IOCTL_NDISUIO_QUERY_OID_VALUE,
>> pQueryOid,
>> dwQueryOidBufferSize,
>> pQueryOid,
>> dwQueryOidBufferSize,
>> &dwBytesReturned,
>> 0))
>> {
>> delete [] pQueryOid;
>> return false;
>> }
>>
>> if(pData != NULL && length > 0)
>> memcpy(pData, &pQueryOid->Data[0], (dwBytesReturned < length) ?
>> dwBytesReturned : length);
>>
>> delete [] pQueryOid;
>> return true;
>> }
>>
>> But now i want to open file DD_NDIS_DEVICE_NAME and want to query same
>> OIDs..how should i do this?
>>
>> Thanks,
>>
>> Arsalan
>>
>>
>
>

Reply With Quote
Thomas F. Divine [DDK MVP]
Guest
Posts: n/a
 
Re: How to query 802.11 OIDs from NDIS
Posted: 05-17-2005, 02:20 PM

"Arsalan Ahmad" <arsal__@hotmail.com> wrote in message
news:Op9w1ptWFHA.2288@TK2MSFTNGP14.phx.gbl...
> Hi,
>
> I am developing an application on Pocket PC 2003 which uses NDISUIO to
> query different oids like OID_802_11_FRAGMENTATION_THRESHOLD,
> OID_11_RTS_THRESHOLD etc. However I am getting Not Supported for these
> OIDs when I query for the supported OIDs from NDISUIO driver. But even
> then if I need to query these OIDs, then please tell me what should i do?
> Is there any other interface available for this? Or can I query the NIC
> driver directly rather than using the NDISUIO driver? My application runs
> on Pocket PC 2003.
>
> Thanks,
>
> Arsalan
If you are getting the "not supported" status for these NDIS queries, then
that means that the information simply is not provided by the miniport.

If you look in the MSDN topic "802.11 Wireless LAN Objects" you will see
that these OIDs (and others) are listed as "optional". This means that the
802.11 miniport writer is not required to support them. In many cases, if
the OID is listed as Optional, then that means that you probaly will never
be able to get the information.

In this case there is no way to fetch the information - regardless of how
you try to get it.

Sorry.

Thomas F. Divine, Windows DDK MVP
http://www.rawether.net


Reply With Quote
 
LinkBack Thread Tools Display Modes
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
PCI card and ndis? sean Windows XP Device Drivers 0 12-23-2004 04:17 AM
NDIS 5.1 WIFI Jerome CHOW-WING-BOM Windows XP Device Drivers 1 11-26-2004 03:28 PM
NDIS.SYS error siewmoey!f1rst.co.nz Windows XP Device Drivers 0 05-17-2004 07:59 AM
NDIS Samples Paul Russell Windows XP Device Drivers 0 11-05-2003 12:20 PM
setting 802_11 OIDs 2K/Xp Pavel A. Windows XP Device Drivers 0 08-28-2003 08:26 PM