Home All Groups Group Topic Archive Search About

InitiateSystemShutdownExA

Author
16 Mar 2006 8:24 PM
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.

Author
16 Mar 2006 9:03 PM
Mattias Sjögren
>Error:Arithmetic operation resulted in an overflow.

Use the Or operator instead of + or &.


Mattias

--
Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.