Tom's Hardware > Forum > Windows XP > Device Driver > How to query 802.11 OIDs from NDIS

How to query 802.11 OIDs from NDIS

Forum Windows XP : Device Driver - How to query 802.11 OIDs from NDIS

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

Archived from groups: microsoft.public.development.device.drivers,microsoft.public.pocketpc.developer.networking,microsoft.public.windowsxp.device_driver.dev (More info?)

 

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

Sponsored Links
Register or log in to remove.

Archived from groups: microsoft.public.development.device.drivers,microsoft.public.pocketpc.developer.networking,microsoft.public.windowsxp.device_driver.dev (More info?)

 

If that device support those you can try
http://support.microsoft.com/defau [...] 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 to Anonymous

Archived from groups: microsoft.public.development.device.drivers,microsoft.public.pocketpc.developer.networking,microsoft.public.windowsxp.device_driver.dev (More info?)

 

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/defau [...] 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 to Anonymous

Archived from groups: microsoft.public.development.device.drivers,microsoft.public.pocketpc.developer.networking,microsoft.public.windowsxp.device_driver.dev (More info?)

 

"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 to Anonymous
Tom's Hardware > Forum > Windows XP > Device Driver > How to query 802.11 OIDs from NDIS
Go to:

There are 570 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them