Archived from groups: microsoft.public.windowsxp.device_driver.dev (
More info?)
Do this in a program (or service) that will monitor network activity.
NDIS driver is not a right place to decide on system power state,
this is why PoSetSystemState is not allowed there.
--PA
"dzemiol" <dzemiol@poczta.onet.pl> wrote in message news:20e95189.0406300103.456f9be7@posting.google.com...
> I'm trying yo get following functionality. My PC is a residential
> gateway with build in WiFi Access Point functionality. The thing is
> that as long as there is a traffic on the WiFi interface (e.g.
> somebody is browsing Inet using laptop which is connected to my PC
> with shared Inet connecton) I don't want my PC to go asleep. If there
> is no traffic on WiFi interface the PC can go asleep to reduce power
> consumption and noise level. So in general the WiFi card should work
> in the similar way that mouse and keyboard are working when speaking
> about power management. Additional thing is that if a user request
> going into standby manualy then the PC should go asleep no matter if
> there is a traffic on WiFi interface. So manual and time triggered
> standby should be treated differently. First I thought about using
> PoSetSystemState every time there is a traffic and respond positivly
> every time driver is asked about going in standby state. I even tried
> that and it works pefectly, but is not compliant with WHQL becouse of
> using PoSetSystemState function which is prohibited in NDIS drivers.
> I hope I explained the practical use for such a feature. Can anybody
> come up with any solution for that problem?
>
> Regards
> Marcin
>
> "Pavel A." <pavel_a@geeklife.com> wrote in message news:<Owl97OcXEHA.2520@TK2MSFTNGP12.phx.gbl>...
> > "dzemiol" <dzemiol@poczta.onet.pl> wrote in message news:20e95189.0406290116.24bb41f6@posting.google.com...
> > > Hi everybody,
> > > I have a short question concerning notifing the system that the NDIS
> > > driver is active. As I saw in sample keybord drivers in DDK the
> > > function PoSetSystemState is used so the system knows keybord is being
> > > used and is not e.g. entering the standby mode.
> > > Unfortunately this function is among those which are forbidden to be
> > > used in NDIS drivers. Does anybody know the way the NDIS driver can
> > > notify the system about its activity so the system is not going into
> > > standby mode if there is a traffic present on the network interface?
> > > Thanks for help
> > > Marcin
> >
> > NDIS drivers (if you mean a MAC miniport) are not in the position to interfere with standby mode.
> > They expose enough info about their state via NDIS counters and other stats.
> >
> > --PA