hello,
i am trying this code on WM5 Emulator and its not working, it throws a
notsupported exception. i tried on my WM5 Device and its not working.
can anybody tell how to Shutdown/Reboot a SP ?
Private Declare Function ExitWindowsEx Lib "Coredll.dll" Alias
"ExitWindowsEx" (ByVal uFlags As Long, ByVal dwReserved As Long) As
Int32
'To Shutdown
ExitWindowsEx(EWX_SHUTDOWN, 0)
'To Reboot
ExitWindowsEx(EWX_REBOOT, 0)
thanks,
AB
Peter Foot [MVP] - 29 Nov 2007 21:44 GMT
Both the arguments are Int32 values, not Long (Which represents an Int64).
Changing these should fix your problem.
Peter

Signature
Peter Foot
Microsoft Device Application Development MVP
www.peterfoot.net | www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility
> hello,
>
[quoted text clipped - 15 lines]
> thanks,
> AB