Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / November 2007

Tip: Looking for answers? Try searching our database.

How to Shutdown/Reboot a SP ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
binarylife9@gmail.com - 29 Nov 2007 17:34 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.