.net-cf-3.5

Out of memory .NETCF Windows Mobile 5

你离开我真会死。 提交于 2019-12-24 03:04:24
问题 We have a .NETCF 3.5 app written in C# where we use some fairly large lists and dictionaries of objects, populated with data from a SQL Server and persisted to SQLCE databases on the device. The app was running very well until recently. The amount of data is such that we are getting Out of memory exceptions quite frequently. Using the Hibernate event, I have confirmed that the OS is indeed asking the app to free up resources (the Hibernate event gets fired constantly). The rub is that I

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-21 21:12:32
问题 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

Reboot Windows Mobile 6.x device programmatically using C#

若如初见. 提交于 2019-12-19 03:19:01
问题 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#? 回答1: 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

Recommended method to calculate the difference between two timespans

﹥>﹥吖頭↗ 提交于 2019-12-13 09:21:57
问题 What should be the best way to calculate the time diff which is accurate upto the level of Microseconds. currently I am doing as follows: ((TimeSpan)(DateTime.Now - _perfClock)).TotalMilliseconds Note: perfClock is DateTime (set prior to task) Which is suppose to give accuracy upto Milliseconds, but in my case it is showing values ends with "000". like 8000,9000 etc... This is forcing me to think that is just converting seconds to Milliseconds somewhere, instead of calculating diff in

Writing on socket to a server with delayed answer causes the socket to resend the request

旧巷老猫 提交于 2019-12-12 04:59:57
问题 I'm trying to send a GET request to a Server with Socket Class.. THIS IS MY TEST CODE: ConnectInternet(); String responseData = String.Empty; String buffer = "GET /" + gLoginString + "/" + Command + "?winmob=" + ClassGlobalClass.VersioneJack + " HTTP/1.1"; if (SendHeader != null) { buffer = buffer + "\nX: " + SendHeader; } buffer = buffer + "\n\n"; try { Byte[] bytesSent = Encoding.ASCII.GetBytes(buffer); Byte[] bytesReceived = new Byte[256]; Socket client = ConnectSocket("217.172.185.199",

How can I install CF 2.0 on my handheld device, and which version/architecture?

↘锁芯ラ 提交于 2019-12-12 04:13:00
问题 To install CF 2.0 on my handheld device (replacing the existing/unwanted version 3.5), according to this (straight from the horse's mouth), I need to run netcfsetupv2.msi from the following directory: \Program Files\Microsoft.NET\SDK\v2.0\CompactFramework I have one problem with that, though: I have no netcfsetupv2.msi - not there or anywhere else, in fact (although I do have a C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v2.0 folder ). I do see "interesting" files such as

RFC on HttpWebRequest vs RESTSharp from Windows CE / Compact Framework 3.5

痞子三分冷 提交于 2019-12-12 00:52:15
问题 I created a simple WebAPI service in .NET4 and Visual Studio 2010. I need to consume that service in a Windows CE / CF 3.5 app I do have HttpWebRequest available to me, but am not sure if this is the way to go, or I should use RestSharp. Does anybody have insight/experience that would help me decide? I prefer not using 3rd party code when possible to avoid it, but am willing to do so if there is a clear advantage over the "raw" offerings. Does anyone have, or know of, examples for accessing

How to load C# winform strings from resource file without rebuild

此生再无相见时 提交于 2019-12-11 07:40:01
问题 I have an application developed on .NET CF 3.5 and I try to localize it for multiple languages. I have made a global resource file that is under Properties folder and moved all strings from code and forms to the resource file. What I want to do is to have one resource file. I will translate the file and deploy on each device. But the problem is: if I change the resource file and run the application without rebuild I still see old resources. What I missed to do? I set resource file build

How to “catch” unhandled Exceptions

江枫思渺然 提交于 2019-12-08 06:13:14
问题 We've developed a .NET 3.5 CF Application and we're experiencing some application crashes due to unhandled exceptions, thrown in some lib code. The application terminates and the standard application popup exception message box is shown. Is there a way to catch all unhandled exceptions? Or at least, catch the text from the message box. Most of our customers simply restart the device, so that we're not able to have a look on the exception message box. Any ideas? 回答1: Have you added an

How to “catch” unhandled Exceptions

核能气质少年 提交于 2019-12-07 10:00:24
We've developed a .NET 3.5 CF Application and we're experiencing some application crashes due to unhandled exceptions, thrown in some lib code. The application terminates and the standard application popup exception message box is shown. Is there a way to catch all unhandled exceptions? Or at least, catch the text from the message box. Most of our customers simply restart the device, so that we're not able to have a look on the exception message box. Any ideas? Have you added an UnhandledException event handler? [MTAThread] static void Main(string[] args) { AppDomain.CurrentDomain