The following info from a google groups discussion may be relevent:
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;

In addition, in responding to a previous discussion on wmi, it bothered me that a some external code was run and interpreted in order to get NIC info, so I came up with this: (You need to install DBD::WMI:
use DBI; use strict; my $dbh = DBI->connect('dbi:WMI:'); # You need to install DBD::WM +I my $sth = $dbh->prepare(<<WQL ); SELECT * from Win32_NetworkAdapterConfiguration WHERE IPEnabled = True WQL my @atts = qw[caption DefaultIPGateway Description ServiceName Index + IPAddress MACAddress ]; # $sth->execute(); while (my @row = $sth->fetchrow) { my $item= $row[0]; for (@atts){ if (ref $item->{$_} eq "ARRAY"){ print "$_\t=". join (",", @{$item->{$_}}) . ";\n"; }else{ print "$_\t=". $item->{$_} . ";\n"; } } print "\n"; }
This probably needs some tweaking to get the info you require. MS document is at http://msdn2.microsoft.com/en-us/library/aa394217.aspx .

Update: One more point : I read somewhere in the MSDN site (Can't find the URL now) that using the WIN32 API to get NDIS info is deprecated. It recommended using WMI.

     "As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom


In reply to Re: OID Power Status Query by NetWallah
in thread OID Power Status Query by cmv

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.