Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ins and outs of OID_PNP_QUERY_POWER

2 views
Skip to first unread message

Pavel A.

unread,
Oct 3, 2003, 11:51:20 AM10/3/03
to
Maybe someone can refresh my focus upon the obvious...

Reading the docum on OID_PNP_QUERY_POWER... and again... and again... and still cannot get it :(
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/network/hh/network/206pm_7ip3.asp

What is the ULONG that OID_PNP_QUERY_POWER returns? Is it current NdisDeviceStateDx of the device?
Or it receives the required NdisDeviceStateDx on entry, in it's *output* buffer??
The e100 DDK sample seems to return always 0....

Thanks in advance,
--PA


Alexander Grigoriev

unread,
Oct 3, 2003, 12:54:44 PM10/3/03
to
ULONG is stored in a buffer *(PULONG)InformationBuffer.
The driver doesn't return anything to the buffer.

Many Query OIDs pass the information to the driver in the
buffer. The buffer is input and output at the same time.

>.
>

Pavel A.

unread,
Oct 3, 2003, 3:17:03 PM10/3/03
to
"Alexander Grigoriev" <al...@earthlink.net> wrote in message
news:00ba01c389cf$0b9a19f0$a401...@phx.gbl...

> ULONG is stored in a buffer *(PULONG)InformationBuffer.
> The driver doesn't return anything to the buffer.

So, driver should just return BytesWritten = 4 and status success?
Caller won't check the output value in InformationBuffer?
And you didn't answer what is in InformationBuffer on entry: desired state or garbage?

> Many Query OIDs pass the information to the driver in the
> buffer. The buffer is input and output at the same time.

Sure, I do this too - but never expected it from _them_ ...
(btw, Jim Mateer wrote that they decided to close this hole - hopefully not in XP yet).

- PA


Bryan S. Burgin [MSFT]

unread,
Oct 3, 2003, 3:48:49 PM10/3/03
to

The caller only checks for success or failure. See samples of
OID_PNP_QUERY_POWER's use in the e100bex sample. Per the documentation,
"The OID_PNP_QUERY_POWER OID requests the miniport driver to indicate
whether it can transition its NIC to the low-power state specified in the
InformationBuffer. The low-power state is specified as one of the following
NDIS_DEVICE_POWER_STATE values: NdisDeviceStateD1, NdisDeviceStateD2 or
NdisDeviceStateD3."

Bryan S. Burgin
bbu...@microsoft.com

This posting is provided "AS IS" with no warranties, and confers no rights.

Pavel A.

unread,
Oct 3, 2003, 4:59:06 PM10/3/03
to
Bryan,
Thank you for the reply. I've read the documentation.

What I want to confirm - is the NdisDeviceStateDx value passed in InformationBuffer
on entry to MiniportQueryInformation? That is, it's OUTPUT buffer is used as INPUT ?

Thanks,
Pavel

""Bryan S. Burgin [MSFT]"" <bbu...@online.microsoft.com> wrote in message
news:W7Qncdei...@cpmsftngxa06.phx.gbl...

Bryan S. Burgin [MSFT]

unread,
Oct 3, 2003, 5:06:40 PM10/3/03
to
Yes.

Alexandre Grigoriev

unread,
Oct 3, 2003, 8:11:03 PM10/3/03
to
The buffer passed to MiniportQueryInformation is
not "write-only". It also contains INPUT data for many
OIDs, such as OID_TAPI_xxx, and others.

The DDK wording is not straightforward enough. It should
say:

"The OID_PNP_QUERY_POWER OID requests the miniport driver
to indicate whether it can transition its NIC to the low-

power state specified in the NDIS_DEVICE_POWER_STATE value
pointed by InformationBuffer." instead of "low-power state
specified in the InformationBuffer". One time I
interpreted it as:

PowerState = (NDIS_DEVICE_POWER_STATE) InformationBuffer;

0 new messages