[Q] How to trace C# code in Windows Mobile 6.5 - Windows Mobile Development and Hacking General

Hi All,
I am using VS2008 to write C# codes for a Windows Mobile 6.5 device. I know that Trace.WriteLine could be used to trace a program for a non Windows Mobile project However, when I try to use Trace.WriteLine in a Windows Mobile 6 project, I receive the following compilation error :
CS0117: 'System.Diagnostics.Trace' does not contain a definition for 'WriteLine'
I find that if I use Debug.WriteLine, then the mobile project compiles OK. But due to some technical issues I have to stick to the "release" build in this mean time. Does anyone know of other ways to trace a C# program in a windows mobile project, i.e. write debug messages to the VS2008 output window.
Thanks for any suggestion.
Regards
Lawrence

How to trace C# code in Windows Mobile 6.5
Hi All,
In fact, I have a downloaded opensource VS2008 solution with a C++ DLL project and a C# Application Form project. The C# project calls the DLL created in the C++ project. Both the two projects have a "release" config but the C++ DLL project doesn't have a usable "debug" config. The original opensource solution could be compiled and run OK if both of the two projects are in "release" mode.
However, I want to turn the two projects into "debug" mode and add debug/trace statements (Debug.WriteLine, Trace.WriteLine) in the two projects. For the C# project it is trivial but for the C++ project I find no way to do this. If I turn the C# project in "debug" mode while keeping the C++ project in "release" mode, the solution rebuilds OK but when I deploy the projects into my Windows Mobile 6.5 device, an exception occurs complaining that the "debug" mode DLL (i.e. the DLL with an extra "D" in its name) could not be found.
Does anyone know of an easy way that I could create a "debug" config from the existing "release" config for the C++ project so that I could turn the whole solution into "debug" mode, or could I re-config the "debug" mode C# project so that it could use the "release" mode DLL created in the "release" mode C++ project ?
I am sorry if I have asked a too naive or too hard question as I am mainly using Java and am new to the VS2008 C++/C# environment.
Thanks for any suggestion and any pointer/link would be appreciated.
Regards
Lawrence

Related

Embedded Visual C++ Version 3.0

Hi,
I've been using emBedded visual C++ for 2-3 years writing application for pocket PC ( Mainly Ipaq'a).
I've recentrly invested in a Xda but when I attempt to "update my remote output file" from with embedded VC ++" i get the following error:
" Microsoft Active sync connection server failed, Please make sure active sync is running and retry the download etc.."
Of course Activate sync is running, and running correctly, Has anyone had this issue before ?
I can manually copy my executable to my device and run it,but then I can't debug. I'm in the process of download VC 4.0 and going to try that, but really wold like to runing in under the 3.0 version.
Any comments would be appreicated.
Bad news dude, eVC++ works only with PocketPC 2000 + 2002. The development environment you'll need to develop on 2003+ is either eVC++ 4.0 or Microsoft Visual Studio.NET.
Thanks for the update,
I've installed Embedded VC 4.0 and the SP3, Now I can download to my XDA which is great.
Now I want to maintain backwards compatiable and download to my ipaqs in 2002, I can't change the actiive configuration to PPC2002
Is there a way to compile my application for both 2002 and 2003 using VC 4.0 or do I need to maintain both IDE's
Sorry but there's no way to maintain both 2K2 and 2K3 targets from eVC 4. You can have the same set of source code but eVC 3 + 4 have different project file types. Have a project per IDE containing the same source code. Just remember when you add files to the project you're working on, remember to add the files to the other platform's project as well.
Happy coding!
-Timbo.

Compiler and Linker Settings for VS2005

I've recently upgraded from EVC4 to VS2005 IDE and have found that some of my CE projects when built do not behave the same as when compiled with EVC4. They are driver projects so not very easy to debug. Are there any recommended compiler and linker settings for VS2005? :roll:
VS2005 beta had a bug that DllMain was never called in DLLs. I have not tested that in VS2005 release.
Are you sure that your drivers don't have some hidden bugs? And be sure not to use internal windows structures, some of them have changed in WM5.

tutorial needed - how to compile and distribute evb applicat

dear all
I have been practising with some sample codes in evb and would like to test them out on my xda. I need educating on how to compile (make) an evb application and package same for installation on my xda. thanks in advance. I looked in eVB tools and got nothing.
ajanaman
XDA's are PocketPC 2003 devices and can not be used for "live" debugging from within the eVB IDE debug environment. Also the 2003 devices need the eVB runtimes installed on them in order to run eVB programs. Checkout www.devbuzz.com for guidelines. HTH.

Modify SourceID of a contact

I tried to find on internet but found nothing on it.
I am trying to modify the SourceID of a contact on Windows Mobile.
I am using .Net, and by now i am sure that it cannot be done.
But if someone can possibly write me a small wrapper which has a function to do this.
I will use that in .Net and pass it an ItemID & SourceID as parameter, and it will modify SourceID of that ItemID.
I am not a guru in c++ and thats the reason i seek help if anyone could help me.
Just to add, Windows Mobile 5/6 SDK comes with a sample app called PimExProvider
It updates all contacts SourceID to a new available id.
This code will surely help to start with if someone can help me.
I was able to do it myself.
I created the c++ dll and called it in .Net.

Little question for C++ programming

Hello my friends,
I need to write a C/C++ apps very simple for windows mobile.
My apps won't have GUI and no console, it's just an apps in order to make some traitments on files.
So my question is, what kind of projet i need to select on Visual Studio 2008, because in Smart device, there is no "application console".
Is possible to just write a cpp file on configure the compilator in order to setting my programm for Windows Mobile device ?
Thanks a lot ,
regards,
Nixeus
Select a Mobile Project, under C++, then select Win32 project. It will start a wizard. in the wizard, select Console App.
That should do it [I use VS 2008, but that should be the same for all of them...]
Okkk
Thanks a lot
regards,
Nixeus

Categories

Resources