Glam Prestige Journal

Bright entertainment trends with youth appeal.

I searched this code ,for sleep mode in cmd windows 7, on the web:RUNDLL32.EXE powrprof.dll,SetSuspendState 0,1,0. Is it safe?

1 Answer

Well... it shouldn't damage anything, but on the other hand, it only works through luck.

The SetSuspendState() function is not suitable for calling through rundll32. It takes three boolean values as parameters – but there's no way to specify that; rundll32 will always give it a specific list of parameters that does not match what SetSuspendState expects at all. (And no, the "0,1,0" will not be interpreted into bools or integers – the whole thing will be passed as a single string parameter.)

So after comparing SetSuspendState and rundll32 parameter lists, it seems that you would end up passing a random non-zero value as bHibernate, a random non-zero value as bForce, and a random non-zero value as bWakeupEventsDisabled. If it happens to work, it's not exactly reliable.

I don't think Windows 7 comes with any tools which allow doing this properly (PowerShell might do the job), so I'd recommend using nircmd standby or psshutdown -d instead.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy