473,320 Members | 2,107 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

InitiateSystemShutdownExA


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.

Mar 16 '06 #1
1 994
>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.
Mar 16 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.