From: Bogdan Dinu on
Hello everybody.

I need to write an application to manage the wireless connections in Windows
Vista, using the Wlan API. I also need to communicate with the driver to set
some adapter properties, like the RTS Threshold for example.

On XP I could send OIDs to the adapter using DeviceIoControl with
IOCTL_NDIS_QUERY_GLOBAL_STATS , but this only works for querries now. Using
\\\\.\\\\Ndisuio does not seem to work also (I usually get the error code
5 - Access is denied.).
Microsoft recommends using WMI, but using wbemtest to the "root\wmi"
namespace the MSNdis_80211_RTSThreshold object does not seem to have write
permissions for the Ndis80211RTSThreshold property. I did not get to write
the code to test it from a program yet, but I also need to set some others
OIDs that I did not find to be mapped through WMI.

So, my question would be:
Does anyone know how can I send OIDs to a wireless network adapter in order
to *set* some values in the adapter, from user mode on windows Vista,
particullary OID_DOT11_RTS_THRESHOLD ? Can I do this from user mode or do I
need to write a kernel component (filter driver or smth) to communicate with
the adapter, and interface it with my application?

Thanks in advance

Bogdan


From: Arkady Frenkel on
AFAIK IOCTL_NDIS_QUERY_GLOBAL_STATS always worked for queries only ( due to
the name :) ). You can't use ndisuio from XP SP2 because it's in use by WZC,
you need to build your own protocol driver
( look at ndisprot in DDK ) for that
Arkady

"Bogdan Dinu" <bdinu(a)ubisoft.ro> wrote in message
news:%23R67wuAMHHA.320(a)TK2MSFTNGP06.phx.gbl...
> Hello everybody.
>
> I need to write an application to manage the wireless connections in
> Windows Vista, using the Wlan API. I also need to communicate with the
> driver to set some adapter properties, like the RTS Threshold for example.
>
> On XP I could send OIDs to the adapter using DeviceIoControl with
> IOCTL_NDIS_QUERY_GLOBAL_STATS , but this only works for querries now.
> Using \\\\.\\\\Ndisuio does not seem to work also (I usually get the error
> code 5 - Access is denied.).
> Microsoft recommends using WMI, but using wbemtest to the "root\wmi"
> namespace the MSNdis_80211_RTSThreshold object does not seem to have write
> permissions for the Ndis80211RTSThreshold property. I did not get to write
> the code to test it from a program yet, but I also need to set some others
> OIDs that I did not find to be mapped through WMI.
>
> So, my question would be:
> Does anyone know how can I send OIDs to a wireless network adapter in
> order to *set* some values in the adapter, from user mode on windows
> Vista, particullary OID_DOT11_RTS_THRESHOLD ? Can I do this from user mode
> or do I need to write a kernel component (filter driver or smth) to
> communicate with the adapter, and interface it with my application?
>
> Thanks in advance
>
> Bogdan
>


From: Pavel A. on
"Arkady Frenkel" wrote:
> AFAIK IOCTL_NDIS_QUERY_GLOBAL_STATS always worked for queries only ( due to
> the name :) ).

Not quite so. Before Vista, there is a trick that lets pass data *to* the
driver,
so that query actually becomes "set" or even two-way ioctl.

Maybe NDIS folks decided that it would be too easy for the Next OS;
it's time for us to learn WMI, methods and so on.

--PA

> You can't use ndisuio from XP SP2 because it's in use by WZC,
> you need to build your own protocol driver
> ( look at ndisprot in DDK ) for that
> Arkady
>
> "Bogdan Dinu" <bdinu(a)ubisoft.ro> wrote in message
> news:%23R67wuAMHHA.320(a)TK2MSFTNGP06.phx.gbl...
> > Hello everybody.
> >
> > I need to write an application to manage the wireless connections in
> > Windows Vista, using the Wlan API. I also need to communicate with the
> > driver to set some adapter properties, like the RTS Threshold for example.
> >
> > On XP I could send OIDs to the adapter using DeviceIoControl with
> > IOCTL_NDIS_QUERY_GLOBAL_STATS , but this only works for querries now.
> > Using \\\\.\\\\Ndisuio does not seem to work also (I usually get the error
> > code 5 - Access is denied.).
> > Microsoft recommends using WMI, but using wbemtest to the "root\wmi"
> > namespace the MSNdis_80211_RTSThreshold object does not seem to have write
> > permissions for the Ndis80211RTSThreshold property. I did not get to write
> > the code to test it from a program yet, but I also need to set some others
> > OIDs that I did not find to be mapped through WMI.
> >
> > So, my question would be:
> > Does anyone know how can I send OIDs to a wireless network adapter in
> > order to *set* some values in the adapter, from user mode on windows
> > Vista, particullary OID_DOT11_RTS_THRESHOLD ? Can I do this from user mode
> > or do I need to write a kernel component (filter driver or smth) to
> > communicate with the adapter, and interface it with my application?
> >
> > Thanks in advance
> >
> > Bogdan
> >
>
>
>
From: Bogdan Dinu on
On XP you could set the driver data using IOCTL_NDIS_QUERY_GLOBAL_STATS.
AFAIK, one could send data by specifying a set OID and putting the
information in the output buffer of DeviceIoControl. This has been
considered a security flaw on Vista (d'oh) and so DeviceIoControl can now be
used for querries only.

Microsoft now recommends using WMI to set the data, the problem is that not
all the OIDs are mapped through WMI and also, it seems to work for querries
only. There are only _read_ rights for the properties.

It has been suggested that a driver is the only approach to get into the
system; I'll study this possibility and come back later with some
conclusions.

Thanks for your help.


"Pavel A." <pavel_a(a)NOwritemeNO.com> wrote in message
news:79E74A56-95AE-4DF3-929C-2B0F9079BC0D(a)microsoft.com...
> "Arkady Frenkel" wrote:
>> AFAIK IOCTL_NDIS_QUERY_GLOBAL_STATS always worked for queries only ( due
>> to
>> the name :) ).
>
> Not quite so. Before Vista, there is a trick that lets pass data *to* the
> driver,
> so that query actually becomes "set" or even two-way ioctl.
>
> Maybe NDIS folks decided that it would be too easy for the Next OS;
> it's time for us to learn WMI, methods and so on.
>
> --PA
>
>> You can't use ndisuio from XP SP2 because it's in use by WZC,
>> you need to build your own protocol driver
>> ( look at ndisprot in DDK ) for that
>> Arkady
>>
>> "Bogdan Dinu" <bdinu(a)ubisoft.ro> wrote in message
>> news:%23R67wuAMHHA.320(a)TK2MSFTNGP06.phx.gbl...
>> > Hello everybody.
>> >
>> > I need to write an application to manage the wireless connections in
>> > Windows Vista, using the Wlan API. I also need to communicate with the
>> > driver to set some adapter properties, like the RTS Threshold for
>> > example.
>> >
>> > On XP I could send OIDs to the adapter using DeviceIoControl with
>> > IOCTL_NDIS_QUERY_GLOBAL_STATS , but this only works for querries now.
>> > Using \\\\.\\\\Ndisuio does not seem to work also (I usually get the
>> > error
>> > code 5 - Access is denied.).
>> > Microsoft recommends using WMI, but using wbemtest to the "root\wmi"
>> > namespace the MSNdis_80211_RTSThreshold object does not seem to have
>> > write
>> > permissions for the Ndis80211RTSThreshold property. I did not get to
>> > write
>> > the code to test it from a program yet, but I also need to set some
>> > others
>> > OIDs that I did not find to be mapped through WMI.
>> >
>> > So, my question would be:
>> > Does anyone know how can I send OIDs to a wireless network adapter in
>> > order to *set* some values in the adapter, from user mode on windows
>> > Vista, particullary OID_DOT11_RTS_THRESHOLD ? Can I do this from user
>> > mode
>> > or do I need to write a kernel component (filter driver or smth) to
>> > communicate with the adapter, and interface it with my application?
>> >
>> > Thanks in advance
>> >
>> > Bogdan
>> >
>>
>>
>>


From: Pavel A. on
"Bogdan Dinu" <bdinu(a)ubisoft.ro> wrote in message news:eu3rHuJMHHA.1240(a)TK2MSFTNGP03.phx.gbl...
> On XP you could set the driver data using IOCTL_NDIS_QUERY_GLOBAL_STATS. AFAIK, one could send data by specifying a set OID
> and putting the information in the output buffer of DeviceIoControl.

No.

--PA