.net-cf-3.5

How to debug a fatal error that happens after calling Application.Exit() in .NET CF 3.5 WinForms application for Windows CE 6?

断了今生、忘了曾经 提交于 2019-12-04 13:49:31
I am porting a .NET CF 1.0 WinForms application (for older versions of Windows CE) to .NET CF 3.5 (for Windows CE 6). The problem is that, a few seconds after Application.Exit() is called, I get a flash of a "fatal error" message box, which simply says something to the effect of "A fatal error has occurred and the application will terminate.". Since I'm using a Chinese version of Windows CE, the message is in Chinese and I'm not sure what the exact message is in English. Anyway, the error message then automatically disappears and the application fails to terminate and release resources

TargetInvocationException: Microsoft.AGL.Common.MISC.HandleAr(PAL_ERROR ar)

余生颓废 提交于 2019-12-04 04:00:06
问题 I get a TargetInvocationException randomly when loading Resources in my .NET Compact Framework 3.5 project (running on Windows Mobile 6). They look similar to this stack trace: FATAL 2012-11-13 14:17:00,657 [23768895] TargetInvocationException - mobileX.MIP.Post.Presentation.Program System.Reflection.TargetInvocationException: TargetInvocationException ---> System.Exception: Exception at Microsoft.AGL.Common.MISC.HandleAr(PAL_ERROR ar) at System.Drawing.Bitmap._InitFromMemoryStream

Reboot Windows Mobile 6.x device programmatically using C#

旧街凉风 提交于 2019-11-30 20:58:40
My HTC HD2 can't be rebooted from OS, just shut down. So I want to write a small program to do that. Is it possible to programmatically reboot Windows Mobile 6.x device using C#? Trevor Balcom You should use the documented ExitWindowsEx API. IOCTL should only be used on platforms lacking the ExitWindowsEx function call (Pocket PC 2000, 2002, and 2003). See the MSDN doc for more information. [DllImport("aygshell.dll", SetLastError=""true"")] [return: MarshalAs(UnmanagedType.Bool)] static extern bool ExitWindowsEx([MarshalAs(UnmanagedType.U4)]uint dwFlags, [MarshalAs(UnmanagedType.U4)]uint