How to turn PC to stand-by mode?

  • Thread starter Thread starter Tomomichi Amano
  • Start date Start date
I don't know how to put system to standby, but for
shutting down the system, you can use PlatformInvoke to
call a windows API - ExitWindowsEx() defined in user32.dll
There must be some api's similar to this in the same
dll....

HTH
Sunil
 
I don't know how to put system to standby, but for
shutting down the system, you can use PlatformInvoke to
call a windows API - ExitWindowsEx() defined in user32.dll
There must be some api's similar to this in the same
dll....

HTH
Sunil

WMI.

Take the Win32_OperatingSystem Class, check for the Primary Instance and
then invoke the Win32ShutDown Method with apropriate parameters.

--
------ooo---OOO---ooo------

Peter Koen - www.kema.at
MCAD CAI/RS CASE/RS IAT

------ooo---OOO---ooo------
 
How about try SetSuspendState() from powrprof.dll

[DllImport("powrprof.dll")]
private static extern bool SetSuspendState(bool Hibernate, bool
ForceCritical, bool DisableWakeEvent);

but u need to get the window's Privilege first before u can invoke this..
 
Back
Top