Friday, July 31, 2009

What Visual C++ codes will I use to hibernate my machine?

1. What Visual C++ codes will I use to hibernate my machine?


2. What holder will be used to call that code that hibernates the machine?





* Please do not give a project sample code... I just want the code use to hibernate a machine and the holder of that code.





This is not a homework, I am just a novice and simple programmer working in a company... :)


Thanks in advance

What Visual C++ codes will I use to hibernate my machine?
You have to use SetSuspendState() API of powrproff.dll.





Prototype may look like this:


private static extern int SetSuspendState(int Hibernate, int ForceCritical, int DisableWakeEvent);


No comments:

Post a Comment