Tech Support > Microsoft Windows > Drivers > [Wireless driver problem within Vista]
[Wireless driver problem within Vista]
Posted by lenslife@so-net.net.tw on September 18th, 2006


Dear all,

There are many OIDs defined in header file Windot11.h.
I tried to create new OID which is only used for our product and used
DeviceIoControl to Set/Query some data to/from driver. But I got error
code number 87 (The parameter is incorrect.). Who can tell me how to
reslove it or have any ideas? Thanks a lot..

Best regard,
- Lens -

Posted by Stephan Wolf [MVP] on September 18th, 2006


You can create your custom OIDs but the first byte must be 0xFF.

Stephan
---
lenslife@so-net.net.tw wrote:

Posted by lenslife@so-net.net.tw on September 19th, 2006


Hi Stephan,

I have tried to use the method you mentioned. But the result was same
as previous result.
Do you have sample code or other suggestions? Thanks.

Lens

Stephan Wolf [MVP] 寫道:


Posted by lenslife@so-net.net.tw on September 19th, 2006


Hi Stephan,

I have resolved it. Thank you..

Best Regard,
- Lens -


Posted by Stephan Wolf [MVP] on September 19th, 2006


lenslife@so-net.net.tw wrote:
How did you solve it?

Thanks, Stephan


Posted by fat_boy on September 19th, 2006



Stephan Wolf [MVP] wrote:

I assume he solved it by not calling an OID via DeviceIoControl().


Posted by lenslife@so-net.net.tw on September 20th, 2006


Hi Stephan,

Just as you said. The custom OIDs should be started with 0xFF.

For example,
#define EX_OID_DOT11_EXAMPLE 0xFF000001.

NDIS_OID SupportedOIDs[] = {EX_OID_DOT11_EXAMPLE,... }

....an Query OID interface...
{
switch(oid)
{
case OID_GEN_SUPPORTED_LIST:
pInfo = (PVOID) SupportedOids;
ulInfoLen = sizeof(SupportedOids);
break;
case ...
case....
}
}

Don't forget to set an array filled OIDs and use OID_GEN_SUPPORTED_LIST
to indicate the array to NDIS. The array is used to tell NDIS how many
supported OIDs to filter.
Now we can set/query an action of OID from application layer.

Best Regard,
- Lens -


Posted by lenslife@so-net.net.tw on September 20th, 2006


In fact, I still used DeviceIoControl to implement in application
layer.


Posted by fat_boy on September 20th, 2006



lenslife@so-net.net.tw wrote:
So you have a protocol driver that takes the OID value out of an IOLCTL
and passes it to your Nic driver.