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
Many Query OIDs pass the information to the driver in the
buffer. The buffer is input and output at the same time.
>.
>
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
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.
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...
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;