compact-framework

.NET can't deserialize nested structs?

早过忘川 提交于 2019-12-12 07:08:04
问题 I'm running into issues getting C# (VS2008, Compact Framework, .NET is version 3.5 SP1) to successfully deserialize nested structs. The problem only appears in CF when I'm running on the emulator for the mobile device (I'm using the "Pocket PC 2003 Second Edition" emulator), the exact same code running on my Windows box does not have the same problem. Here's my code: public struct Fred { public string Name; } public struct Middle { public Fred[] Freds; } public struct Top { public Middle

Why is there an err parsing this DDL, and why can't the engine be more specific about locating it?

白昼怎懂夜的黑 提交于 2019-12-12 05:26:53
问题 With this DDL ("BLA" is a tablename in the form "CCR130329093342") ALTER TABLE BLA ADD salvation float NOT NULL WITH DEFAULT ...I'm getting, " There was an error parsing the query. [Token line number, Token line offset,, Token in error,,] " Okay, then, which line number? offset? It knows/thinks there's a problem, but can't or won't say what or where. Is there anything obviously wrong with this DDL? Should it be this instead: ALTER TABLE BLA ADD salvation float NOT NULL WITH DEFAULT 0.0 ?

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 reference ProcessInfo's members and ProcessCE in my Windows CE util?

廉价感情. 提交于 2019-12-12 04:55:46
问题 I found this code from CathalMF here: ProcessInfo[] list = ProcessCE.GetProcesses(); foreach (ProcessInfo pinfo in list) { if (pinfo.FullPath.EndsWith("MyExe.exe")) pinfo.Kill(); } ...and modified it to my ends (no pun intended) like so: ProcessInfo[] list = ProcessCE.GetProcesses(); foreach (ProcessInfo pinfo in list) { if (pinfo.FullPath.EndsWith("HHS.exe")) pinfo.Kill(); // This should work, too, eh? if (pinfo.FullPath.EndsWith("HUtilCE.dll")) pinfo.Kill(); } ...but several things are

How can I circument the “80004005 There is a file sharing violation…” err msg on a SQL Server CE database?

℡╲_俬逩灬. 提交于 2019-12-12 04:37:22
问题 I am getting error 80004005 There is a file sharing violation. A different process might be using the file. when trying to open a SqlCeConnection . Is there a way to close a SQL Server CE database programmatically, to try to nip that problem in the bud? Something like (pseudocode): SqlCeDatabase SQLCeDb = "\My Documents\HHSDB003.sdf"; if (SQLCeDb.IsOpen) { SQLCeDb.Close(); } ? Or a way to set the connection so that it doesn't care if the database is open elsewhere/wise, such as:

Intercepting and cancelling the Click event of a WinForms Button

柔情痞子 提交于 2019-12-12 04:18:40
问题 Is there a way to capture the Click event of a Button from the parent Control and prevent it occuring if a variable within the parent Control is true? For example: private void AssignEventOverrides() { foreach (Button button in Buttons) { // Get the event assigned at design time var someUnknownEventHandler = GetTheClickHandlerSomehow(button); // Unsubscribe the unknown event button.Click -= SomeUnknownEventHandler; // Assign the intercepting event button.Click += button_Click; } } private

Find INI File From application path and Read INI File in Compact framework C#

▼魔方 西西 提交于 2019-12-12 04:17:59
问题 i Want To Find Confic.INI File From Application path and i want get values, i mean read INI file data to string... My Code { StreamReader Sdr=new StreamReader( System.IO.Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)+"\Confic.INI") //HERE I AM NOT GETTING APPLICATION PATH AND FILE NAME)// String data=file.readline(); } Please help me.. Thank You 回答1: To find application dir I use: Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) So

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

Windows Mobile - Creating a Device Independent Bitmap by Size in CF.NET

大憨熊 提交于 2019-12-12 03:39:55
问题 I've been fighting with my rendering (OutOfMemoryException When Creating a Large Bitmap in CF.NET) for a while, and I'm still looking for a good way to fix my issues. My engine creates a single large bitmap (2x or 3x bigger than the size of the screen), and draws everything to that surface. I then draw that image onto the screen at an offset, allowing the user to scroll VERY smoothly. This works great most of the time, but some users encounter OutOfMemoryExecptions when creating that large

Customizing the DataGrid in Compact Framework 3.5

巧了我就是萌 提交于 2019-12-12 03:24:57
问题 I have a requirement to develop a CF (Windows Mobile 5) project for an old ScanGun (MC9090). I would like to add a few CheckBox columns and a Combobox column to optimize the small UI space. I found a reference to Eric Hartwell's DataGrid Extension (how to put checkboxes in datagrid in windows mobile 6 using c#?), and though the example code still exists, the link to the extension download is dead. I know the reference AND the technology are old, but I sure could use this to cut development