>Sorry for the late reply, but i was busy :)
>
>But, i don't get that function to work.
>It doesn't look like an valid API call, and also VFP doesn't have a datatype for sending BOOLs to a API function.You can use integer type with 1 represetning True, and 0 - False.
>It also stats about a "powrprof.lib" which i can't find on my HD.
>
>Do you have an exmaple of getting this to work ?All examples in the article are for a C/C++ language. Here's the code that works on my WIn2kSP2 PC.
DECLARE Integer SetSuspendState IN Powrprof.dll ;
Integer Hibernate, ;
Integer ForceCritical, ;
Integer DisableWakeEvent
SetSuspendState(1,0,0)
--sb--