how to perform a soft reset in compactframework?

  • Thread starter Thread starter shansheng
  • Start date Start date
S

shansheng

Hi everybody,
we know there's a standard api function 'winexec' could perform soft
reset in windows98/2000,but in windows ce this api function is not
supported anymore,here's my question:how can I make a soft reset in
windows ce?is there another api function to replace 'winexec' in ce.net?
any hint will be appreciated.

shansheng
 
Here is a sample how to do this from eVC++ for a PocketPC:
http://www.pocketpcdn.com/articles/softreset.html.
Since you are using the .NET CF you need to P/Invoke KernelIOControl or use
the OpenNETCF WinAPI, see www.opennetcf.org.
I am not sure if this works for any Windows CE device, but you could give it
a try.

In your managed application you can define IOCTL_HAL_REBOOT as follows:

const Int32 METHOD_BUFFERED = 0;
const Int32 FILE_ANY_ACCESS = 0;

const Int32 FILE_DEVICE_HAL = 0x00000101;

Int32 IOCTL_HAL_GET_DEVICEID = ((FILE_DEVICE_HAL) << 16) |
((FILE_ANY_ACCESS) << 14) | ((15) << 2) | (METHOD_BUFFERED);

--
Regards,


Maarten Struys
PTS Software bv
 
Back
Top