Thanks Chris
I am using window mobile 5.0
I Build cab file using VS2005, While build cab after intall cab file in
Device popup message "Do you want to restart it" ok Cancel button
User clicks "ok" button device restart method calls. Cancel means user in
half way process manually restart device.
I dont want Messagebox use it. Example First time .Netcf cab install in
device after installation popup message to restart device same way i am
expected.
How to do it . Please give better ways and idea.
Megan
Christopher Fairbairn said:
Hi,
M. Meganathan said:
I like to restart device programatically alert message popup to device.
How to do it.
What version of the Windows Mobile OS are you targeting?
You could try calling the ExitWindowsEx API (documented on MSDN at
http://msdn.microsoft.com/en-us/library/ms893047.aspx)
Passing the EWX_REBOOT flag should reset the device for you.
You would need to use Platform Invoke functionality to access this from a
.NET CF application. In C# something like the following should be
sufficient:
[DllImport("aygshell.dll")]
private static extern bool ExitWindowsEx(int uFlags, int dwReserved);
private const int EWX_REBOOT = 2;
Hope this helps,
Christopher Fairbairn