Re: why this API (SetSystemPowerState) can not change the system power state??



I could explain you but that would take a lot of time. As I said earlier, take a look at the PM source code (\WINCE500\PUBLIC\COMMON\OAK\DRIVERS\PM) and read the code.

In short: The powermanager manages the entire system and knows about all the different components (like drivers, applications, running threads, user activity, system activity, etc). You, as an application (or driver), can not know what is going on on the entire system so how can you be the one making a decision for everyone else?

Learn the PM API and architecture. Documentation is very good on this.

Good luck,

Michel Verhagen, eMVP
Check out my blog: http://GuruCE.com/blog

GuruCE Ltd.
Microsoft Embedded Partner
http://GuruCE.com
Consultancy, training and development services.

Hzh wrote:
Hi, Michel

Thank you.

According to what you said, it works. I can change the system power state from useridle to on. Thank you very much.

But I still don't understand why this API, SetSystemPowerState, does not work??? Could you tell me why?

Thank you again.

Best Regards

Ricky

.



Relevant Pages

  • Re: BSDI 4.3 Kernel API -> FreeBSD X.X Kernel API?
    ... >I have ported my drivers from Windows to Linux to Solaris to FreeBSD so I am ... >FreeBSD that the port was fairly simple. ... Different API all over. ... Hence you need the BSD/OS 4.3.X Source Code. ...
    (comp.unix.bsd.freebsd.misc)
  • Re: why this API (SetSystemPowerState) can not change the system power state??
    ... the different components (like drivers, applications, running threads, ... user activity, system activity, etc). ... Learn the PM API and architecture. ...
    (microsoft.public.windowsce.embedded)
  • Re: why this API (SetSystemPowerState) can not change the system power state??
    ... OEMPowerOff, has been called, and I used a GPIO interrupt as a wake up ... the different components (like drivers, applications, running threads, ... user activity, system activity, etc). ... Learn the PM API and architecture. ...
    (microsoft.public.windowsce.embedded)
  • Re: Source code for CAN Implementations
    ... I Kindly request the Source code links for CAN Implementation as I am ... for C164 and have also used drivers from Vector. ... MISRA-C and SIL2 were not something we cared about greatly:) ... third party libraries I have seen in my time, that was a positive surprise. ...
    (comp.arch.embedded)
  • Re: Driver Expert
    ... WinDBG requires source code for each driver version that you ... > to debug, but your major revisions will have labels in VSS anyways. ... > However, minor revisions may not, so having the source in the SoftICE ... This is not always nice IMO, especially for big drivers. ...
    (microsoft.public.development.device.drivers)