windows-mobile,compact-framework,sql-server-ceRelated issues-Collection of common programming errors


  • Mark Cheeseborough
    c++ windows-mobile embedded
    My application is implemented as a service (running under services.exe). I am adding a new feature which requires being notified when the user sends an SMS.I have tried using IMAPIAdviseSink, registering with both IMAPISession and IMsgStore, but I do not get any notifications.The other options I can see are to create a Short Message Service Provider or to implement the IFormProviderEx interface, but I am not sure about the impact this might have on SMS functionality and the user experience.Is th

  • Chris B
    c# windows-mobile compact-framework
    My application is currently running on a handheld device that is running Windows Mobile 6.5. I want to be able to capture the Left/Right soft key button presses within the application and take the User to the “home” form or another form that is used frequently inside the application. At the OS level, these soft keys are set up to go to Calendar/Contacts respectively, however inside my application I would like these buttons to do as mentioned above. How do I go about capturing or intercepting the

  • Grace Note
    windows-mobile compact-framework access-violation
    I have a large Compact Frameworks V2.0 application that in most cases works very well. On certain devices about once a day, a user receives a Native Error 0xC0000005 that is not caught with the standard managed Try/Catch block. My application synchronizes with the server via ASMX calls at fixed intervals. The problem appears to occur during synchronization. There is considerable business logic in addition to the ASMX call that happens at the time of the synchronization, but 98% of that is ma

  • Daniel Schneller
    java windows-mobile mobile rcp
    I am trying to deploy our eRCP (embedded Rich Client Platform) application on a Windows CE5 Professional device. While the eRCP demo applications work fine on the J9 VM upon starting our application I get the following exception:!ENTRY org.eclipse.osgi 4 0 2008-09-24 11:01:15.088 !MESSAGE An error occurred while automatically activating bundle org.eclipse.ercp.swt (63). !STACK 0 org.osgi.framework.BundleException: Exception in org.eclipse.ercp.swt.Activator.start() of bundle org.eclipse.ercp.swt

  • zort15
    c# windows-mobile registry
    I wrote three programs that modifies the registry in Windows Mobile to install and remove a todayscreen plugin for debugging purposes. They worked great for a while, but one by one they have suddenly been giving “UnauthorizedAccessException”s.See the code for two of the programs below (note that the following code just sits directly in Main, so it runs and then the program terminates)…RegistryInit.exe:RegistryKey CustomItem = Microsoft.Win32.Registry.LocalMachine.CreateSubKey(@”Software\Micros

  • ctacke
    .net windows-mobile compact-framework pinvoke emulator
    I am having a lot of trouble getting a basic scenario to work on windows mobile 5.0 emulator. I have a winforms app that eventually calls into native code. Deployment works fine and all the native DLLs are copied in the same folder as the winforms .exe. I also verified this is the case with Remote File Viewer tool.However when I launch my app, it always fails with “Can’t find PInvoke dll — System.MissingMethodException” error (when the time comes to call into native code, the DllImport attri

  • user75569
    c# c++ windows-mobile native
    I have a windows mobile solution which contains two projects. One written in C# and another in C++ (unmaneged code that compiles into a dll). The part written in C# invokes some C++ functions from dll to connect to a server.If I open my application and I connect to the server everything works ok. If I minimize it , or if I open another windows mobile application over my application and try again to connect to the server it fails with a native exception code. (Exception code: 0xc000001d.)Any ide

  • Barry
    c# exception windows-mobile compact-framework
    I maintain a c# compact framework application and have had 2 cases in 2 days where the a caught exception had a unexpected string in the Message. Both times due to a different exception type being thrown. In the following code the socket exception is caught, but the message shown relates to something else.//method1try{soc.Connect(new IPEndPoint(IPAddress.Parse(_serverAddress), _serverPort));}catch (Exception ex){MessageBox.Show(ex.Message)}//method2try{m_socServer.Connect(new IPEndPoint(IPAddr

  • Has AlTaiar
    c# dll web windows-mobile code-reuse
    I have a class library that targets Windows Mobile CF, and I want to use the same dll on some Desktop/Web application. When adding a reference to the project I get the following error. adding a reference to a device project may produce unexpected resultsI am not sure what would be the result of such “unexpected results”

  • user2123544
    .net windows-mobile
    i want to develop simple application for Motorolo MC 9190 G mobile it has inbuilt bar code scanner, i want to scan the bar code and display them in the msg box. i dont have the mobile so i have to test it in Emulator. when i deploy the code in emulator it gives null exception error. my code is i add sample.barcode dllPrivate barcodeReader As Symbol.Barcode.Reader // error occurs here itself barcodeReader = New Symbol.Barcode.Reader() barcodeReader.Actions.Enable() Dim nextReaderData As Symbol.B

  • B. Clay Shannon
    c# sql sql-server-ce compact-framework windows-ce
    I want to refactor this code, because it seems wasteful and wacky and weird:public string getVersion() {try{string dynSQL = “SELECT * FROM invHeader”;DataSet workSites = dbconn.getDataSet(dynSQL);//Go thru dataset and display the working files//Only need one, although we’ll be duplicating the version//per each site as a check value during upgrades//return workSites.Tables[0].Rowsforeach (DataRow row in workSites.Tables[0].Rows){sVersion = row[“ID”].ToString();break;}}catch (Exception ex){Duckbil

  • Chris B
    c# windows-mobile compact-framework
    My application is currently running on a handheld device that is running Windows Mobile 6.5. I want to be able to capture the Left/Right soft key button presses within the application and take the User to the “home” form or another form that is used frequently inside the application. At the OS level, these soft keys are set up to go to Calendar/Contacts respectively, however inside my application I would like these buttons to do as mentioned above. How do I go about capturing or intercepting the

  • Vaccano
    c# .net debugging compact-framework
    I have the following method:protected void OnBarcodeScan(BarcodeScannerEventArgs e) {if (BarcodeScan != null){//BarcodeScan.BeginInvoke(e, null, null);BarcodeScan(e);} }When I try to step into the above method it works fine. I am able to step in and over all the parts of the method. However, if I switch the comment (so BarcodeScan(e) is commented out and remove the comment on BarcodeScan.BeginInvoke(e, null, null) then I cannot step into any part of the OnBarcodeScan method (ie a break point o

  • Grace Note
    windows-mobile compact-framework access-violation
    I have a large Compact Frameworks V2.0 application that in most cases works very well. On certain devices about once a day, a user receives a Native Error 0xC0000005 that is not caught with the standard managed Try/Catch block. My application synchronizes with the server via ASMX calls at fixed intervals. The problem appears to occur during synchronization. There is considerable business logic in addition to the ASMX call that happens at the time of the synchronization, but 98% of that is ma

  • CAP
    .net debugging memory-leaks compact-framework
    I’m working with a transaction-based system on a Windows CE device under the Compact .NET Framework v3.5. What we’ve found is that as more-and-more transactions are performed, less-and-less memory is available. Obviously a memory-leak of some kind.After each transaction, we take two memory readings; one from the OS (a PInvoke call), and one from the Garbage Collector. We’ve found that the OS reading is increasing memory usage, while the reading from the GC stays relatively stable (about a 1MB va

  • ctacke
    .net windows-mobile compact-framework pinvoke emulator
    I am having a lot of trouble getting a basic scenario to work on windows mobile 5.0 emulator. I have a winforms app that eventually calls into native code. Deployment works fine and all the native DLLs are copied in the same folder as the winforms .exe. I also verified this is the case with Remote File Viewer tool.However when I launch my app, it always fails with “Can’t find PInvoke dll — System.MissingMethodException” error (when the time comes to call into native code, the DllImport attri

  • Stormenet
    c# winforms compact-framework formborderstyle
    On a WindowsCE platform (custom build) our C# gui uses regular forms to show an “popup menu”. We set the FormBorderstyle to None as we don’t want the form controls to be visible.Some clients reported “Gray boxes” after a while. After some testing here we could reproduce the problem quite fast. When we open 2 different menu’s (forms) constantly the platform shows us an native exception.ErrorA native exception has occurredin Tiger.CEHost.exe. Select Quit andthen restart this program, or selectDeta

  • pitprog
    wcf compact-framework self-host
    I’ve been trying to figure out how to consume a self hosted WCF service from a Windows CE device. I’ve not found any good resources that walk through this process online. I’ve found some good samples for self hosting, and that part seems to be working fine, but not sure how to go about consuming on the compact framework.In the past I was able to use NetCFSvcUtil.exe, but this doesn’t seem to work with a self hosted service. NetCFSvcutil says:The underlying connection was closed: An unexpected

  • Srv19
    c# compact-framework nlog
    I am trying to add logging to application running on mobile device with Windows Mobile 6.1. ? .NET Compact framework 3.5. using NLog.I have appropriate version of NLog distribution installed.However no log files are created.Here is my NLog.config file:<?xml version=”1.0″ encoding=”utf-8″?> <nlog xmlns=”http://www.nlog-project.org/schemas/NLog.xsd” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”><targets><target name=”logfile” xsi:type=”File” fileName=”.\Neolant.ASRM.Te

  • Shaihi
    .net compact-framework windows-ce shared-libraries code-organization
    I’m starting a new project. It will run on devices running Windows CE, Windows Mobile 6 and will also have a desktop version. The software will connect to some equipments through the serial port, using it’s own protocol. Basically it will:connect to the equipment send and receive info read and write binary filesThese tasks will be shared between desktop and mobile devices. I’ve been searching the information I need, but I still have some doubts:If I create the solution targeting Windows CE devic

  • suuuzi
    c++ visual-studio-2010 mfc sql-server-ce stdafx.h
    I have a Visual Studio 6.0 project that uses SQL Compact Server. I’m trying to update the solution to use on Visual Studio 2012, but i have the following error:fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>My stdafx.h includes winsock2.h, who have this:#ifndef _INC_WINDOWS #include <windows.h> #endif /* _INC_WINDOWS */There is a way to supress the error? How do I proceed? When I remove the windows.h of the files that include it indir

  • B. Clay Shannon
    c# sql sql-server-ce compact-framework windows-ce
    I want to refactor this code, because it seems wasteful and wacky and weird:public string getVersion() {try{string dynSQL = “SELECT * FROM invHeader”;DataSet workSites = dbconn.getDataSet(dynSQL);//Go thru dataset and display the working files//Only need one, although we’ll be duplicating the version//per each site as a check value during upgrades//return workSites.Tables[0].Rowsforeach (DataRow row in workSites.Tables[0].Rows){sVersion = row[“ID”].ToString();break;}}catch (Exception ex){Duckbil

  • Ian Boyd
    sql-server-2008 deployment sql-server-ce ado xcopy
    How do i deploy Microsoft SQL Server Compact 4.0?SQL Server Compact Edition (currently at version 4.0) is:a free, embedded database that software developers can use for building Windows desktop applications. It has a small footprint and supports private deployment of its binaries within the application folder.But how do you actually deploy it? Microsoft says it can be deployed within the application folder (good) and supports xcopy deployment. Microsoft also says it cannot be deployed within the

  • Nasreddine
    .net sql-server-ce compact-framework2.0
    I am using Motorola device xr480 which does not have GUI.When I try to access .sdf file in the device, i am getting the above error using the following code :string Connection_String = @”Data Source=Application\RFID_FR_Data.sdf;Persist Security Info=False”; SqlCeConnection cn = new SqlCeConnection(Connection_String);Please guide me to solve the issue.

  • Mark Evans
    sql-server tsql sql-server-ce sql-ce
    I’ve got an unexpected problem. I’m making a script to update the schema on a SQL CE database. This won’t run:if not exists (Select column_name from information_schema.columnswhere column_name = ‘TempTestField’ and table_name = ‘Inventory_Master_File’ )Alter table Inventory_Master_Fileadd TempTestField nvarchar(10) null I think this is because I’m using stuff that isn’t supported in SQL CE. Anyone know how to do this? I’ve tried rearranging the script and can’t get anything to work. I tried “

  • marc_s
    wcf sql-server-2008-r2 sql-server-ce microsoft-sync-framework
    I am using Visual Studio 2010 & SQL Server 2008 R2. I have created a project to sync SQL Server CE (*.sdf) file to SQL Server using a WCF service.It is working fine when I have small SQL Server CE file (18 MB) but when I tried to sync using a large SQL Server CE file (38 MB) then an error happens.I have increased size of many parameters in web.config of the WCF service & app.config of my application.But the error keeps occurring…..The underlying connection was closed: The connection wa

  • VDohnal
    c# linq entity-framework sql-server-ce linqkit
    I use Entity framework 6 with SQL CE 4 and use following class to retrieve data.using LinqKit; using System.Data.Entity; public class QSampleOverview {public Sample SelectedSample { get; set; }public string ProductTypeName { get; set; }public string ProductName { get; set; }public int? SampleID { get; set; }public string ProductTypeName { get; set; }public string ProductType { get; set; }public Category Category1 { get; set; }public Category Category2 { get; set; }…public static List<QSampl

  • Hot Cool Stud
    c# asp.net database sql-server-ce
    I have a SQL Server Compact database function for insertion and selection . public Exception SetPartyDetails(PartyDetails pd) {query = “Insert into [Party Details] ( [Name],[Address],[Tin No],[Land Line No],[Mobile No]) values (@Name,@Address,@PartyTin,@LandLineNo,@MobileNo)”;try{com = new SqlCeCommand(query , con);com.Parameters.AddWithValue(“@Name”,pd.name);com.Parameters.AddWithValue(“@Address”,pd.address);com.Parameters.AddWithValue(“@PartyTin”,pd.tinNo);com.Parameters.AddWithValue(“@LandLin

  • Let me Ask
    entity-framework compact-framework sql-server-ce
    I have VS 2008 SP1 and SQL Compact Compact 3.5 SP 1 installed.I can see “ADO.NET Entity Data Model” when I go to Add -> New Item in Web Application project but same is not shown in Smart Device 2.0 application.How to use Entity Framework (which version) with .NET CF 2.0 application and SQL Compact 3.5 SP 1?

  • marc_s
    sql-server entity-framework sql-server-ce sql-server-express sql-server-2012
    I have a small project that will have 1 user on 1 computer. The database will be rather small (probably less than 1 mb of data). I plan to use WPF and Entity Framework for that project.I came up with 2 potential database solutions for my project : SQL Server CE and SQL Server Express LocalDB (with SQL Server 2012). I have never worked with any of those, I’m more used to work with the full SQL Server 2008 installation. I also want it to be easy to install on the client. Ideally I’d like to just

Web site is in building