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 / March 2007

Tip: Looking for answers? Try searching our database.

Warm boot

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ivo - 29 Mar 2007 10:02 GMT
Is it possible to Warm boot a device with a windows CE 4.2 .net program ?
Peter Morris - 29 Mar 2007 10:13 GMT
private static Int32 FILE_DEVICE_HAL = 0x00000101;

private static Int32 FILE_ANY_ACCESS = 0x0;

private static Int32 METHOD_BUFFERED = 0x0;

private static int CTL_CODE(int DeviceType, int Function, int Method, int
Access)

{

return ((DeviceType << 16) | (Access << 14) | (Function << 2) | Method);

}

[DllImport("Coredll.dll")]

private extern static uint KernelIoControl

(

int dwIoControlCode,

IntPtr lpInBuf,

int nInBufSize,

IntPtr lpOutBuf,

int nOutBufSize,

ref int lpBytesReturned

);

public static uint Reset()

{

int bytesReturned = 0;

int IOCTL_HAL_REBOOT = CTL_CODE(FILE_DEVICE_HAL, 15,

METHOD_BUFFERED, FILE_ANY_ACCESS);

return KernelIoControl(IOCTL_HAL_REBOOT, IntPtr.Zero, 0,

IntPtr.Zero, 0, ref bytesReturned);

}
Paul G. Tobey [eMVP] - 29 Mar 2007 16:47 GMT
Note that support for this IOCTL is up to the OEM, so while it should work
in many cases, it may not work on all such devices.  It's better to check
with the OEM of the target device(s) and see what they say about rebooting
the device.  They may tell you to use this method, but there may be some API
that they provide that does other things (such as closing open files, etc.),
on their device.

Paul T.

> private static Int32 FILE_DEVICE_HAL = 0x00000101;
>
[quoted text clipped - 46 lines]
>
> }

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.