InitiateSystemShutdownExA

  • Thread starter Thread starter oembuilders
  • Start date Start date
O

oembuilders

Can anyone help. I have been trying to write a little app using
advapi32.dll and if I
use a dwResaon other than SHTDN_REASON_FLAG_PLANNED as int32 =
&H80000000
I get a error. I have tried using "SHTDN_REASON_FLAG_PLANNED +
SHTDN_REASON_MINOR_CORDUNPLUGGED" or "SHTDN_REASON_FLAG_PLANNED &
SHTDN_REASON_MINOR_CORDUNPLUGGED". Can anyone help with these error's.

Error:Arithmetic operation resulted in an overflow.
 
Error:Arithmetic operation resulted in an overflow.

Use the Or operator instead of + or &.


Mattias
 

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

Back
Top