Does rundll32.exe supplies missing parameters??

A

Academia

If this statement appears alone in a .bat file it causes hibernation
rundll32.exe powrprof.dll,SetSuspendState Hibernate

SetSuspendState takes 3 parameters.
What does the above statement supply as parameters?

Why does "Hibernate" have a value?



Thanks
 
N

Newbie Coder

Academia,

The statement you wrote about is the following:

run the powrprof.dll calling the SetSuspendState function passing the Hibernate as a
boolean parameter

See:

http://msdn2.microsoft.com/en-us/library/aa373201.aspx

The function declaration is in C++ but the boolean are either TRUE or FALSE

As you see the function declaration is in PowrProf.h header

Simple, isn't it?
 
A

Academia

My question relates more to what a .bat file does.
Or maybe it is what rundll32.exe does.

I've seen the declaration of SetSuspendState and it requires 3 parameters.

But the example I gave supplies one parameter, Hibernate, which isn't set to
anything.
I imagine it is initialized to zero which is false to SetSuspendState.

But when rundll32 calls SetSuspendState it needs to supply 3 parameters and
I've only told it that there is 1 parameter.

If SetSuspendState is called with 1 parameter I wonder if it will grab junk
from the stack for the other two.


Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top