compact-framework

How to Auto-Update Windows Mobile application

£可爱£侵袭症+ 提交于 2019-11-30 04:14:17
I have a .net cf 3.5 Windows Mobile application that my client wants to have autoupdate features. Here is what I have so far: create a CAB using the Smart Device CAB Project (is this good enough, or should I be doing something else here) 2.Get the application version number Assembly.GetExecutingAssembly().GetName().Version.ToString(); Call a WCF web service for to do a version number look up. Download a new version of the cab file. ??? Execute WCELoad.exe on the CAB file Profit Your solution is generally correct, but has a few problems. You can't update yourself. You have to shut down and have

BinaryFormatter does not exist in CF. Solutions?

心已入冬 提交于 2019-11-30 03:32:40
问题 I need to serialize/deserialize obj in/from byte[] on compact framework but there is no BinaryFormatter, what should i do? Thanks. This is the class i am using on the server side and i want it also on the client(a device with windows mobile 6) public class Serializer { public byte[] SerializeObject(object obj) { if (obj == null) return null; using (MemoryStream stream = new MemoryStream()) { BinaryFormatter formatter = new BinaryFormatter(); formatter.Serialize(stream, obj); return stream

Windows CE deletes .NET CF on reset

感情迁移 提交于 2019-11-30 00:53:42
I'm writing a C# application for a proprietary Windows CE 4.2 device (for which I don't have the specs or pretty much any other information. I've got access to the file system, and that is basically it.) I also can't get support from the original manufacturer. Now, I can install the .NET Compact framework just fine, and everything works for a while. But every once in a while, when the device is reset, it deletes the framework, the GAC, everything related to it. I know it's not just a hard reset jumping back to factory defaults because: It remembers the registry settings (If I try to install

Designing forms to work on different resolutions and aspect ratios on Windows CE

南楼画角 提交于 2019-11-29 20:02:20
问题 I have a .NET 2.0 application that runs on Compact Framework. It has a bunch of different forms that were all originally designed to run on a specific device with a specific screen resolution. I'm now looking to get this application to run on some other devices that have very different screen resolutions (some have completely opposite aspect ratios where the screen is now taller than it is wide). My question is how can I change my forms to look good on these other screens? This is a bit

Developing applications for Windows Embedded Compact 2013

为君一笑 提交于 2019-11-29 19:08:25
问题 Today I stumbled over the Application Builder for CE 2013 in Microsoft's download center. As of the description, with this pack I should be able to develop apps that target Windows Embedded Compact 2013 with Visual Studio 2012. After downloading and installing the Application Builder I found the new framework assemblies in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\WindowsEmbeddedCompact\v3.9 , but there are no project templates targeting Embedded Compact 2013 in Visual

What is wrong with this HttpWebRequest/HttpWebResponse code (why is it considered a “bad” request (400))? [closed]

牧云@^-^@ 提交于 2019-11-29 18:28:02
Based on the info from this MS link , I've got the following code in a Windows CE / Compact Framework app which calls a REST method in a Web API server app: public static string SendXMLFile2(string uri, string data) { //TODO: Remove below after testing String s = data.Substring(0, 128); MessageBox.Show(String.Format("data length is {0}, uri is {1}, first part is {2}", data.Length, uri, s)); //TODO: Remove above after testing HttpWebRequest myHttpWebRequest=(HttpWebRequest)WebRequest.Create(uri); myHttpWebRequest.AllowWriteStreamBuffering=false; myHttpWebRequest.Method="POST"; UTF8Encoding

.NET can't deserialize nested structs?

北战南征 提交于 2019-11-29 18:18:44
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 Middle; public Fred[] Freds; } public static void Test() { Top top = new Top(); top.Middle.Freds = new Fred

“Compatibility Pack” for backporting new .NET Framework features?

只谈情不闲聊 提交于 2019-11-29 17:48:17
问题 For various reasons I often find it desirable to write code that is compatible with .NET framework 2.0 or 3.5 or compatible with the .NET Compact Framework, but it is a problem that there are numerous "small" features in new .NET frameworks that are not available in the older frameworks or Compact Framework. For example, I find extension methods are really useful, but the compiler depends on System.Runtime.CompilerServices.ExtensionAttribute for this. You can easily define this attribute

wince 6 smart device Could not establish secure channel for SSL / TLS error

匆匆过客 提交于 2019-11-29 17:21:17
I have a web service which i need to access through https. We have a workbout pro 4 with win ce 6.0 running on it. When we were developing our app we had tested it through http. wihtout any problem. When we went live and needed access to https based server we have received the error stated on subject field under VS 2008 Smart Device Project. On the device we receive an error "could not display..." . We have tried to import the standard certificate issued by global si. We still have no success accessing the web service. We can acces the web service on phone, tablet, pc but not with Pro 4:). It

Change file LastWriteDate in Compact Framework

守給你的承諾、 提交于 2019-11-29 15:37:46
FileSystemInfo.LastWriteTime property is readonly in CF. Is there an alternative way to change that date? P/Invoke SetFileTime . EDIT Something along these lines (warning: untested) [DllImport("coredll.dll")] private static extern bool SetFileTime(string path, ref long creationTime, ref long lastAccessTime, ref long lastWriteTime); public void SetFileTimes(string path, DateTime time) { var ft = time.ToFileTime(); SetFileTime(path, ref ft, ref ft, ref ft); } AlainD Here is a fuller implementation, adapted from the answer ctacke provides above and this StackOverflow question . I hope this proves