how to perform a soft reset in compactframework?

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
 
M

Maarten Struys

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top