What are the best books on WM5 - Windows Mobile Development and Hacking General

Hi all,
I am new to WM5.0 programming but programmed for Winodws so i have some questions plz :wink:
does eVC++ 4.0 support developing for WM5.0?
what are the best books available for learning WM5.0 programming?
Mohammad

Best Book? You mean "Any"?
We have the same problem. The only book on CE 5.0 is in Chinese.
We ordered the newest CE book avilable, it's from 2003.
But there's a lot of CE documentation from Microsoft, and of course you can learn a lot here.

this is really strange, we find thousands of books about VC++, VB and others... isnt there a bool on WM5??

Not even CE 5.0, let alone WM 5.0.
But a lot of those VC# and C++ books are very pertinent.

Don't know of any books, but I can answer you question about eVC 4.
You can develop apps that will run on WM5, but you can't use WM5 SDK.
Mainly, this means that if you want to use a WM5 specific functions (not many of those) you have to go through LoadLibrary and GetProcAddress instead of direct linking.

Thanks, but I have installed eVC++ 4.0 and its sp4, when I try to run it, it tells me that it cant run because no sdk was found, so what to do if WM5.0 sdk cant be used with eVC++ 4.0??? do I have to use VS .NET 2005?
thanks all
Mohammad

mohgdeisat: You need to install the previous WM2003 SDK and can then develop apps in the normal way, that will run on WM2003 and WM5. What you can't do without WM5 SDK is develop apps JUST for WM5.
However, I imagine that you can install the WM5 SDK anyway, and directly use the Libaries and Headers manually, just by pointing the project settings to load libraries from the WM5 directories.
I do this in quite a few of my WM2003 apps anyway.
This will still make a WM2003 app, but it will support WM5 features, if you're lucky.
I don't suggest installing Visual Studio unless you have to, but if you're serious about developing on WM5, then I very much recommend it.
And remember, Microsoft gives a free trial version of the Professional version, for download (2.7gb).
http://forum.xda-developers.com/viewtopic.php?t=59991&highlight=visual+studio+trial
If you have to reinstall every 3 months, it's still cheaper then buying it I guess. :wink:
V

Actually, you can't install the WM5 SDK unless you have the studio. I tired and got the message "You have no products that can use this SDK installed ..."
It wouldn't let me continue.
If someone knows of a workaround for this (that does not include installing VS 2005) I would be glad to hear it.

Take apart the cabs/installers and extract the headers and libraries.
I can zip them up if you want, I suppose.
I may be confusing myself with Platform Builder, but that's how I'd do it if I had to.
V

Thanks for the idea V and the offer. No need to zip the stiff though.

Thanks guys,
I am really interested in building WM applications as I believe that WM development will have a giant jump in then next years.
I am ready to install VS .NET 2005, but I am not interested in developing .NET applications for WM5.0 environment, I read about CF and CE programming and I came up with a conclusion that if I want to develop serious commercial and robust applications then I should use C++, either pure WinAPI programming or at least use miniMFC library.
I really care very much about robustness and resource usage of applications, I also want to use a productive development tool/environment.
My question is, when you compare between miniMFC vs pure WinAPI programming you find miniMFC more productive, yet WinAPI is more robus,portable and efficient, so I have to compromise here... What do u think should I use miniMFC or WinAPI? does the development in WinAPI bring great performance advantages over miniMFC?
Thank you
Mohammad

I think you are missing something here.
MFC (mini or not) is basically a collection of prepared code. It still uses win32 API (there is no getting away from them unless you are using .NET) but it raps them up in convenient classes. If you are writing a large app, with a lot of interface components (multiple dialogs, view windows etc) MFC can save you a whole lot of coding, though statically linking it will add about 0.5MB to your app size.
Using MFC also doesn't exclude using win32 API directly to reclaim functionality that MFC skips.
When writing small utilities or system add-ons like today plug-ins it is best not to use MFC to reduce app size.
While I agree with you 100% that .NET CF is still to resource hungry for Pocket PC and Smartphone devices, it should be noted that when writing large GUI rich apps that require database or other outside components using .NET saves a whole lot of work for the programmer (while the user pays the price in speed and memory).

Thank you,
I know that MFC wraps win32 api in classes for the ease of use, it has also a good OO hierarchy, and this is very good, it increases productivity but as far as I know there are costs when using MFC library, those include Exe file size, memory usage, and even cpu resource usage.
As I read from many books, programming windows applications using pure Win API enhances performance (speed/resource usage) but I dont know to what degree it enhances performance.
in short, MFC is more productive, easy and well managed.. but WinAPI is more efficient.. but when I use Win API program development will take longer time than it takes with MFC, so is using Win API (no MFC) is justified by its performance advantages over MFC (or miniMFC)??
Thanks

Does .Net have something like JIT Compiler?

mohgdeisat, sorry, I misunderstood you. When you asked if you should use MFC or pure win32 API I assumed you thought they were mutually exclusive.
I haven't actually measured this with any tool, but from writing apps both ways I can tell you that while file size can get significantly larger (by as much as 0.5MB maybe more) as far as speed is concerned there seem to be no noticeable difference.
Also you have the option to link to MFC dynamically which will eliminate the increase of your exe size.
The difference in programming effort is very noticeable, specially when building dialogs and handling their controls. What needs only a couple lines of code with MFC is likely to take whole functions without.
So for a large program I recommend you to use MFC or look in to some alternatives like ATL.

Related

New Programmer (Maybe)

Hi to all,
i'm new in xda\xda2 world...and i would like to develop under it? What i need for developing? What cpu type\model it have?
Well.. The About and Device Information screens in the System Settings menu should take care of your questions..
But if you're lazy, the XDA typically runs PocketPC 2002 on a StrongArm CPU, and the XDA II PocketPC 2003 (Windows Mobile Edition) on an Intel XScale (which is backwards compatible with ARM).
If you simply visit www.pocketpc.com and click on developers you'll end up at http://www.microsoft.com/windowsmobile/information/devprograms/default.mspx
Where you can even order a free DVD-Rom with the PocketPC SDKs, compilers etc (they will charge shipping and handling, at a freakishly high rate). You can also download that stuff.
However, you will need Visual Studio .NET as well, which is not a free download (in fact, even the academic version will set you back more than EUR 100).
I've not ventured into it myself yet, so it's quite possible you can actually do without Visual Studio (as the compilers themselves can be downloaded). Also, there's a version of gcc for pocketpc.
Any one developing for pocketpc who wants to chip in here? (I'd like to toy around with programming a bit on PPC - regretably it doesn't have a built-in scripting language like epoc32 has/had).
You only need Visual Studio .NET if you want to create .NET applications. If you are just programming in C++, I'd highly recommend downloading Embedded Visual Studios 3 and 4 and get the appropriate SDKs (all of which are free). At least, that's what I use.
What about Java Midlets?
I am thinking on writing a couple of apps for PPC, but going into VS.NET might be too deep for me. I also want to extend those later for palm and maybe desktop. No hardware specific stuff so I thought I might get away with Java which I am pretty good at.
Does anyone have anything to say - pros / cons? How midlets are on O2 in general - fast / slow, too much memory or processing power? Please share.
Why don't you get down to c++? Fast, small, general support...
--------------
У нас сегодня день вежливости, так что вы просто идите за мной и никуда не сворачивайте!
Some day
Good old C++. Too many years with Java - softened my mind... Undoubtedly C++ is the best way to go in terms of speed and size. Lets see what people say. :idea:
I've been programming in Visual .NET (VB.NET more specifically), but even after installing the SDK I have no idea where to start? When creating a project, I don't see any new project type for Pocket PC applications ? In fact, what else do I need to do if I want to program in VB.NET ?
i read that visualstudio .net 2005 will be able to make pocketpc applications in all languages not just .net applications like 2003
not sure about how you get started with vb.net since vb is very evil and nasty
but with c++ mfc and c# .net you start out with a form and there you can place components on it and program what functions they have
but if you want to make games and stuff which dont use normal windows stuff then you are better off programming them in c++ directly for the arm platform
I use Embedded VC++ and MFC as it's far tighter/smaller than .net. Purists can go completely Win32(ce) native and avoid MFC altogether but MFC does make development a good deal easier without the bloat of .net (not to mention how slow it is..).
Same thing for me. C++ with EVC tools. No mfc for me (a little purist and feel it gives a clearer code )
Best way to have samller and optimize applications
I've been programming in Visual .NET (VB.NET more specifically), but even after installing the SDK I have no idea where to start? When creating a project, I don't see any new project type for Pocket PC applications ? In fact, what else do I need to do if I want to program in VB.NET ?
Click to expand...
Click to collapse
If you have VS.NET 2003 you don't even need the SDK.
just File-> New->Project
on the left column "Project Types" choose your language and on the right click the "Smart Device Application"
Basically is like any windows application but less possibilities and if you want to create any serious application you'll have to do a lot of optimization and native coding.
Good luck
Books?
I'm also interested in programming with Embedded VC++...and was wondering if anyone know of books out there I can pick up that will help my learning process a little quicker. Its been a long time since i coded in C++ and need to refresh.
The part I'm really need help is the basic parts ...like how to get things started.
I'm confident that once I get started i'll start to remember my C++ coding.
I'm downloading the Embedded VC++ from Microsoft as I type this post ...hope it wont be too hard to understand how to create a simple "hello world" program for PPC devices
Also if anyone knows a good web sites with code samples ...please PM or post the URL, I'v seen some but not all that great
Thank You
Sometimes less is more.......
zendrui said:
Same thing for me. C++ with EVC tools. No mfc for me (a little purist and feel it gives a clearer code )
Best way to have samller and optimize applications
Click to expand...
Click to collapse
As mentioned above, if you drop ATL, MFC .NET and all the implied baggage they have to bring with them to work, you are left with the old WIN32 programming model. This is now considered very 'old hat', but if all your program uses are API's in WIN32's kernel.dll, user.dll, gdi.dll etc...... i.e. the very primative windows stuff, then it is possible to write an application that will run on any version of Windows Mobile. This application will be pretty simple, but the compiled .EXE file targetted at an ARM4xx model will run on almost any Pocket PC, without any other files. (i.e. The single APP.EXE file will run on any upwardly compatable system, no fancy implementation project to create or run, just copy the release '.exe' file to the target machine, and it will run!). These days 99%+ mobile PDA's run ARM class processors. The manufacturers call them by their own processor IDs but under the hood they are all the same.
To create an app that will run on the Mobile 5/6 platform without looking like previous Mobile 2002/3/SE apps, limit the Main menu items to two. This will make sure they appear either side of the input icon, as menu items. More than two and the Mobile 5/6 menu items appear as 2002/3/SE apps in the old control bar style.
wfberg said:
(I'd like to toy around with programming a bit on PPC - regretably it doesn't have a built-in scripting language like epoc32 has/had).
Click to expand...
Click to collapse
As far as scripting goes... I'm a big fan of Mortscript. It's so simple... I guess I'm a little purist myself
Basic 4PPC
Basic for Pocket PC, has anyone tried this. I went to the site and it only cost around 40.00 US. I've worked with "basic" before and the progs were usually bloated and sluggish. Wonder if this would be the same.
i have started developing in ppl language the program name is PIDE from ariana soft..its very easy..it also lets u make games
ive created my first clock in it

Developing Software getting started

I looking for advice on getting started developing simple programs for WM5 - I guess I'm not really bothered if they don'y make use of the advanced features
The options appear to be
#1 MS Visual Studio 2005 (90-trial or $$$)+ WM5 SDK (free)
#2 MS Embedded Visual C++ 4.0 SP4 (free) + WM2003 SDK (free)
#3 MS Embedded Visual C++ 3.0 - 2002 edition - PPC2002+SP2002 SDK included (free). Also include Embedded Visual Basic.
As my recent experience is VB I guess option 3 is best C++ learning curve might be a bit steep given the just for fun motivation
but ..... there are other options saw this today
PPL - Pocket Programming Language
Write software for your PocketPC and PC in minutes using our new programming language. PPL is a fast and easy-to-learn programming language that is fully object-oriented. PPL runs on all Pocket PC using PocketPC 2000, 2002, Windows Mobile 2003, 2003SE, and 2005 (VGA compatible). PPL also runs on Windows 2000, XP, 2003 Server desktop computers. Programs written for one system are 100% compatible with the other.
Write high quality games in no time using our easy-to-use GameAPI that incorporates physics, isometric display support, pixel-perfect collision detection and so much more...
Design forms visually on your PDA or desktop computer with the visual form builder. Edit components properties and code events within the same interface. PPL is a complete development environment.
Starting as low as $39.95 USD for a limited time.PPL - Pocket Programming Language
Write software for your PocketPC and PC in minutes using our new programming language. PPL is a fast and easy-to-learn programming language that is fully object-oriented. PPL runs on all Pocket PC using PocketPC 2000, 2002, Windows Mobile 2003, 2003SE, and 2005 (VGA compatible). PPL also runs on Windows 2000, XP, 2003 Server desktop computers. Programs written for one system are 100% compatible with the other.
Write high quality games in no time using our easy-to-use GameAPI that incorporates physics, isometric display support, pixel-perfect collision detection and so much more...
Design forms visually on your PDA or desktop computer with the visual form builder. Edit components properties and code events within the same interface. PPL is a complete development environment.
Starting as low as $39.95 USD for a limited time.
http://www.pocketpcthoughts.com/forums/viewtopic.php?t=52935&highlight=
there must be other options?
I guess SharpDevelop 2.1
develop is an Open Source IDE written in c# and running on the Microsoft .NET platform.
http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.CompactFramework2Development
Opinions welcomed
The old VB for CE (and eVB) were rubbish. Unless it changed in much later versions these were just VBscript, not actually VB. Very limited functionality indeed.
All the C++ versions work OK (and I still use eVC++ 4 sometimes) , but of course C++ is a fairly fiddly, low-productivity language. It's not really the ideal language for having a play.
So, sorry to say, of the Microsoft ones VS2003/VS2005 using VB.net or c#.net are by far the easiest, and most productive of other offerings.
Never tried the non-MS ones.
Stuart
The real trouble with embedded VB is the runtime library it requires which will not run on WM 5 (it barely works on WM 2003).
I remember seeing a cheap and according to the manufacturer powerful VB compiler in some post on the forum, but for the life of me can't remember the name. It compiles to native code and doesn't require a run time.
Now it's true that C++ takes more work to get things done, but it also gives you more power. Even if you just program for your self you may one day want to create your own today plugin or even keyboard and that can't be done in .NET
My recommendation: Spend a little time and learn MFC. It has a lot of similarities to the .NET languages and saves a lot of work for C++ programmers.
[OT] i've also just started "trying" to create applications using vb.net on VS5. Am i allowed to ask questions here? Or is there a thread for posting vb or c questions?
Never seen a specif thread for these, and I am here quite often for a long time.
If you have a specific question you can even open a new thread, no need to clatter several unrelated issues in to one giant thread just because there about same programing language.
Just do a quick search first to make sure it's not something that was asked a 100 times and away you go.
Thanks I guess that leaves me with
PPL - Pocket Programming Language and SharpDevelop 2.1c#
thanks levenum. i will be doing that
starfish_001 said:
Thanks I guess that leaves me with
PPL - Pocket Programming Language and SharpDevelop 2.1c#
Click to expand...
Click to collapse
I can highly recommend ppl, seeing as I just entered the games competition and had my entry done in just over twenty days, without any real windows based programming background.
it's relatively cheap, and the support is great, with questions on the forum getting a very fast turn around.
Here's another to look at Basic4ppc
http://www.basic4ppc.com/
Basic4ppc and ppl are both great little applications
what is MFC ?
levenum said:
My recommendation: Spend a little time and learn MFC. It has a lot of similarities to the .NET languages and saves a lot of work for C++ programmers.
Click to expand...
Click to collapse
trying ot choose on which programming language I will begin with and I was wondering what is MFC ?
Thank you
MFC == microsoft foundation Classes --- library
it's a library which encaption the gui and other general purpos functionalitet of windows in a set of classes that makes it
easier to get ones program up and running without having to
worry about WinMain and a messageLoop
http://en.wikipedia.org/wiki/Microsoft_Foundation_Classes
microsoft have long since abandoned mfc as their pref library
now they are pushing .NET
problem is that .net is slower more so on devices like pda's
MFC really means
Mother F*cking Crazy, which it will drive you! All joking aside it is probably the best thing to develop in. I've writen small apps with it on every CE since 2.11 and even on XPeMbedded (which I'd avoid like the black death).
I've had great success with C# on WM5 and Pocket PC before. Even wrote a handheld POS terminal. Microsoft is really behind .NET and it will be supported for a long time. It's very easy to learn and the documentation is great.
Visual Basic .NET will do the same job, but keep in mind the switch from VB6 to VB.NET is HUGE. Just because some of the code looks the same doesn't mean it is. I'd take the time and learn C#. If you're really serious register as Microsoft ISV (their program is Empower for ISVs). For $375 you get basically everything MS has written in the last 10 years. You get 5 development use copies of anything you want including Visual Studio 2005 Professional. All you have to do is create an app for a Microsoft system in 18 months.
PM me if you need any more details.
Thanks
starfish_001 said:
Thanks I guess that leaves me with
PPL - Pocket Programming Language and SharpDevelop 2.1c#
Click to expand...
Click to collapse
Thank u bro

Software Development

Can I develop software to WM5 but no .Net frameworks ?
Of course!
In fact it is much better to use native code on WM devices because it is faster and takes up less resources.
If you already know C / C++ go to MS site and download the free eMbedded C++ 4 and the Pocket PC 2003 SDK (don't mind the OS version).
Also if you have VS 2005 download the WM 5 SDK and create a smart device project in C++.
1 cool think about .net though is i had a sudoko or whatever it's called
program for pda and the same exe workd on pc too
but all in all .net is a slow as java though on pocketpc the .net maybe better implemented then the java vm's
levenum said:
Of course!
In fact it is much better to use native code on WM devices because it is faster and takes up less resources.
If you already know C / C++ go to MS site and download the free eMbedded C++ 4 and the Pocket PC 2003 SDK (don't mind the OS version).
Also if you have VS 2005 download the WM 5 SDK and create a smart device project in C++.
Click to expand...
Click to collapse
hi levenum,
i have VS 2005 and WM 5 sdk installed.
well my problem is C++ which i never read seriously but i have a good
working base of C on which i had developed two simple game.
How can i implement the code in VS2005/WM5SDK with minimal
interaction of C++ ?
How can i get working base on VS2005/WM5SDK?
Can u suggest me a tutorial or any free book?
with c vs. c++ it's really much the same ++ is just an expansion with nativ class and other object orientented features
any c program should be able to compile using a c++ compiler
but i doubt you can write CE programs or even windows programs without using any kind of class related code
heck you cant even do that in basic (evil language) or c#
the internet is soo full of free programming stuff it's not even funny
buying paper books is a thing of the past imho unless you want to read while on the toilet and dont have a laptop or pda
http://www.brpreiss.com/books/opus6/
good googling for more
Actually, except for M$ nasty invention called "COM" there is nothing in Windows API that requires C++.
In fact I rarely use classes unless I am building an MFC app to save time.
Also, (can't remember the link for the life of me) but there is some way of accessing class objects in pure C using some struct tricks.
So basically you can leave fine without the ++, but you may need to work a little harder.
You should just create a basic smart device project. VS will generate a "hello world" app for you and you can see how it works. Moving from C to C++ should be very easy.
It's C# that is no longer a real programming language
P.S.: Did you know most of Win CE DLL are actually written with ANSI C?
levenum said:
Actually, except for M$ nasty invention called "COM" there is nothing in Windows API that requires C++.
In fact I rarely use classes unless I am building an MFC app to save time.
Also, (can't remember the link for the life of me) but there is some way of accessing class objects in pure C using some struct tricks.
So basically you can leave fine without the ++, but you may need to work a little harder.
You should just create a basic smart device project. VS will generate a "hello world" app for you and you can see how it works. Moving from C to C++ should be very easy.
It's C# that is no longer a real programming language
P.S.: Did you know most of Win CE DLL are actually written with ANSI C?
Click to expand...
Click to collapse
thanx,
i had already compleated "hello world"
and C++ is really not much away from me
actually i only have a single problem:
How can i get working base on VS2005/WM5SDK?
Click to expand...
Click to collapse
well i think it is more exactly Win CE API knowledge which i require.
How Do I Start Cooking Roms
I Know A Bit Of C++ ,how Do I Start Cooking My Own Roms
tawanda: first off - your question has nothing to do with this thread, if you have an unrelated question you should start a new thread BUT search first to make sure it was not asked and answered a 1000 times!
As for your question - cooking ROMs is not programming - it helps to know a programming language but what you really need to do is familiarize your self with the tools used to pack and unpack as well as dump and flash ROM images.
Note that these tools are different for different devices or at the very least need to be configured differently.
I recommend you start by reading the WiKi.
After some years of absence from the programming world I think now I've time enough to start again. I'm familiar (but a bit rusty) with assembler, C and C++, but I think I have start more or less from the beginning.
I already installed Visual Studio 2005 and the WM05 and WM06 SDK. Now I'm not sure whether I should use C# or C++. The big difference is that C# needs compact framework?
Your question is mainly a matter of personal preference.
Here is my opinion on C++ vs. C#:
C++ advantages:
- Native code is faster than .NET
- Easier access to Win32 APIs
- Ability to write system components like keyboards and today plugins.
C# advantages:
- Saves on coding time
- Allows use of many .NET CF components to quickly accomplish complex tasks.
Please note that I am bias. I hate .NET and want nothing to o with it. Specially on mobile devices that do not have the processing power to spare for the .NET overhead.
I second levenum's recommendations -- I've been programming big Windows for 15 years and have managed to avoid .NET. Of course most of what I do these days is NDIS driver programming, so it's mostly straight C, with C++ for supporting user-mode code.
Avoid MFC -- it adds a bit of overhead which is OK for big Windows, but not for WM. If you're going to use a C++ framework, I highly recommend using ATL/WTL -- it's what MFC wants to be when it grows up.
I'm looking at my visual studio 2005 and wanting to covert my c# application to C++...
I clicked on a new project and i'm looking at the various options in Visual C++ for Smart Devices. There are a few to choose from... how do I know which one I want to choose?
ATL Smart Device Project
MFC Smart Device Application
Win32 Smart Device Project
MFC Smart Device ActiveX Control
MFC Smart Device DLL
Can you guys tell me the difference between those options and which I should use to develop for WM6?
Thanks,
Derek
imho then a good pro of c# vs. c++ is the nice object lib that .net give
mfc is pretty crap in every respect and if you do pure stk
it's more work to make it object orientated
"ATL Smart Device Project
MFC Smart Device Application
Win32 Smart Device Project
MFC Smart Device ActiveX Control
MFC Smart Device DLL"
depend on what you want to do
i mean DLL is not a program but a lib that other programs can access
but then today items are dlls
win32 is pure win32 stk where you pretty much have to do all the prev work to get your application up and running
mfc is microsoft foundation clases it's an somewhat dated object lib from ms which makes making an application faster it pretty much give you a dialog and let you place components such as button on it
ActiveX is an somewhat evil internet programming platform
atl http://en.wikipedia.org/wiki/Active_Template_Library
you can prob find more info about everything you want more info about
from wikipedia too
thanks for the info rudegar!

New programmer on pocketPC... advice?

hey guys, I'm a career developer with tons of experience in a lot of things except PocketPC. I want to play around a bit with PPC, but would like to hear about the development platforms, languages, etc. that you're using and what you like about them. I don't know anybody personally that's even remotely interested.
I'm currently using VIsualStudio2005/C# for my day job, and am pondering whether that's a good fit for PPC. A lot of documentation exists for both managed and native PPC C# code. Managed code is more like the stuff I do all day.
What I've found so far is that managed code requires runtimes to be installed (already there on WM6 i hear), there's a noticeable delay when starting a managed program, and a lot of functions are missing from the .NetCF.
I'd probably be writing business apps (database stuff, web back-end client/server, etc.) as well as hacks like today plugins, utility programs, etc.
Should I just start right out with native coding, or try and hack away with managed code. What's your opinion?
roboHaxx,
As i'm sure you're already aware of, choice of language on this environment really depends on the application you're designing.
I tend to use Visual Studio/C# for applications that I need to develop rapidly where I'm not too concerned about load times. The .NetCF libraries really helps in ensuring things get done quicker but there's a tradeoff in speed and functionality but not by too much thanks to all the new spec devices that are coming out.
If I'm developing something that doesnt need to get done faster, and I need quick loading times (like today plugins for example), I tend to stick with C (evc4).
Personally I stay away from .NET and all related stuff like it was toxic waste.
As kunz wrote it is too slow for PPC (at least for now) and if you want to use the .NET CF 2 any user with a device prier to WM 6 (which is the majority for at least another year) will have to install 5MB worth of run time.
But there are some very nice apps made with CF already out there like Hitchhiker so it defiantly has its place.
One problem though: if you want to develop system components like today plugins, keyboards (SIP) or control panel applets you will need a component written in C / C++. All those are DLLs that the system expects to export certain functions. This can not be done with managed code, and as far as I know not at all in C#.
One final recommendation: look up all threads started by Vijay555.
He wrote a pretty good summary of programing tools and options for WM devices somewhere on this forum.
Thanks for the replies. I'm think I'm starting to get a grip on this platform.
Sounds like the same principles as programming on a PC. For business apps (like in my day job), the managed, quick-to-market environments like C#, .net and CF2 prevail. But for performance, versatility and access to everything, C is the way to go. C++ if you must.
by the way, I thnk you can create DLLs in any Visual Studio language. I do it all the time with C# and VB. Now whether these DLLs can export the functions that are needed in PPC, I don't know the answer to that.
kunz, you said
If I'm developing something that doesnt need to get done faster, and I need quick loading times (like today plugins for example), I tend to stick with C (evc4).
pardon the dumb question but, what is evc4? A compiler I presume. That was going to be my next question. Which compilers do you like?
eVC is eMbedded Visual C++ 4.0 its a free C++ IDE for Windows Mobile from Microsoft.
It is almost identical to VS 6 (if you are familiar with it).
It won't except WM 5 or 6 SDKs, but any program create on it (with WM 2003 SDKs) will run on any Smartphone or Pocket PC starting with WM 2003 through WM 6.
For older versions you will need eVC 3.
The following pages should provide some useful information:
http://channel9.msdn.com/wiki/default.aspx/MobileDeveloper.HomePage
http://www.pocketpcdn.com/tools/index.html
Enjoy!
Hi,
I am programmer but I'm new in mobile development too.
I have an ideal to write a program that can speak the caller number instead of ringtone. The problem is that I don't know how to get the receiving call events.
Can we solve this situation with .net compact framework?
Anyone have documents to share?
Thanks

Programming CE, Book and resource recommendations

Hello,
After a decade of not doing C, I find that alot of things have changed when programming c++ native for CE. Even things like:
string somestring;
no longer function. Wow!.
strcpy has been replaced with StringCchCopy. Wow, MS has done a number here... and so on...
Anyhow I searched xda and found allot of good threads. But what if I'm looking at re-learning C++, with a focus on CE programming only? What books and other resources would you recommend, its almost like starting from scratch. I got vs2005 + emu + been reading allot of MSDN, did some basic apps. etc.
BTW: How the .... do you declare a variable length string???
and in VS2005 is running the debugger the only way to get the app to start automatically ???
Thanks
*bump*, anyone?
Couple of notes:
1) I strongly recommend avoiding VS, it is unbearably slow and balky.
2) strcpy and all the other functions are still supported by c runtime on CE (VS 2005 complains about them but you can ignore it). The problem is all windows API on CE use UNICODE so you have to declare strings as WCHAR (thats MS speak for unsigned short) and use wcscpy, and such.
3) The only book I know on CE specifically is this and I only read the two sample chapters online, so can't really recommend it. (Though the sample chapters were very useful). What you need is to get a good book on Win32 programming that will get you well on your way.
4) There is an MFC class CString which wraps up all string related functions very nicely. If you are not using MFC but clean C/C++ the only thing I can think of is malloc and free or the C++ versions new and delete.
Check out the links in my sig if you want to see code examples of small but functioning apps.
I disagree with levenum's comment on VS, but agree at the same time (weird I know). I wouldn't use VS for native development because it has A LOT of extra features that I think would be useless for native developers. Also, the lighter eVC++ has pretty much everything you need to write native apps.
I had this book called "Programming Windows CE 3.0" or something along those lines a few years ago. I got it for like $3 on Amazon. If you can find an updated version of that (or even the old version would be useful) then you should buy it. It will show you all you need to know to get started. You can learn the new api's from browsing msdn.
If you're only a little rusty with C/C++ I would suggest jumping right in to the Sdk samples and seeing how they do things.
Thanks, the reason why I wanted to use VS is so that maybe later I wouldn't mind going into MFC. So having one platform would be nice.
So far I have done some basic things, like drawing, etc, but I find I'm having a harder time making strings and including the api's to work. Almost all of the msdn examples fail to compile properly.
I have an old book MFC for Windows 95 by MS, is it even worth looking at ?
robp said:
I disagree with levenum's comment on VS, but agree at the same time (weird I know). I wouldn't use VS for native development because it has A LOT of extra features that I think would be useless for native developers. Also, the lighter eVC++ has pretty much everything you need to write native apps.
I had this book called "Programming Windows CE 3.0" or something along those lines a few years ago. I got it for like $3 on Amazon. If you can find an updated version of that (or even the old version would be useful) then you should buy it. It will show you all you need to know to get started. You can learn the new api's from browsing msdn.
If you're only a little rusty with C/C++ I would suggest jumping right in to the Sdk samples and seeing how they do things.
Click to expand...
Click to collapse
could you provide some links for msdn. also i know how to program in c but how do i compile a program for windows ce could you recommend a free one. thanks
The only way to code for Windows Mobile for free is to use embedded Visual C++. You'll have to google it to find a link.
Once you have that downloaded, check out:
http://msdn2.microsoft.com/en-us/library/bb158662.aspx
The new solution files most probably won't open in eVC++ but you can create new projects and add the source files yourself.
You'll want to look at the samples in the Win32 folder.
robp said:
The only way to code for Windows Mobile for free is to use embedded Visual C++.
Click to expand...
Click to collapse
That's not entirely true - there's still ceGCC (it works on linux or windows using cygwin) - however this one lacks resource (window, forms, etc) editor (but if you have resources already created it will compile/link properly). But it works great with apps where you want to handle all the graphics and user interaction by yourself (like games, or programs with 100% custom UI), for example using SDL, pocketHAL, etc.
Also, wxWidgets seems to have support for windowsCE, and might be made to work with ceGCC, but i haven't tested it yet.
Sorry, I actually meant to put "(I think)" after that sentence lol.
Actually I think you should be able to use any C++ compiler as long as you have the necessary libraries, and I think all the libs you need are in the sdk download. But the easiest route for beginners in native coding is probably eVC++
Well, now i can agree with you
That is, unless you want to create games - in that case ceGCC+XFlib might be a good way to go for someone with general programming knowledge, but not familiar with winCE-specific coding. Some games coded with it (and their sources) can be found on XFlib homepage: www.xflib.net.
thanks for the info
Ok, as I wouldn't mind at a later time going into MFC, and building dll's for mobile. How much "harder" would it be for me to learn VS2005 native for ce instead of using evc++ ?
Just trying to weight the cons and the pros. BTW where can I get eVC ?
Thank you.
Two more free options: PellesC and Lazarus + WinCE add-on
I don't think it would much harder. Once you get the hang of it you'll find that it makes life much easier. If you buy a boxed retail version it comes with a nice book that will take you from n00b to master in a few hours (not really but it's still a great reference).
I think the hardest part of upgrading to newer versions of VS is learning the new project file setup. Atleast that's what it looks like from watching other students at my school go from VS6.0 to VS2k5 and 2k8.
Also, I should note that I prefer VS2008 hands-down, but I don't disagree with other people who say eVC++ is faster. While I haven't done any real native development since eVC++ 4 was new, I still dabble a bit (especially since getting active on this forum) and VS2005 works great to me.
So, my advice would be to use the newest tools available to you, unless money is an issue. But don't be worried about upgrading. Your life will only get easier once you do.
robp said:
Also, I should note that I prefer VS2008 hands-down, but I don't disagree with other people who say eVC++ is faster. While I haven't done any real native development since eVC++ 4 was new, I still dabble a bit (especially since getting active on this forum) and VS2005 works great to me.
So, my advice would be to use the newest tools available to you, unless money is an issue. But don't be worried about upgrading. Your life will only get easier once you do.
Click to expand...
Click to collapse
Well I just got eVC and will give it a try too. But I am pretty much used to vs2005. I do not think I can't afford the vs2008 right now. How much difference is there between 2005 and 2008 when it comes to programming for WM?
I'm looking to create some commercial applications for WM. For the last 10 years I'v been doing .com apps, now I figured I would do some for the mobile platform. We have all the graphics/design/marketing guys for .com, so it should work out just fine for WM.
One thing we noticed when working with exec type people is their frustration, I see exactly how we can help them resolve their frustration with WM, Symb, and java type phones...
Thanks
marek101 said:
Well I just got eVC and will give it a try too. But I am pretty much used to vs2005. I do not think I can't afford the vs2008 right now. How much difference is there between 2005 and 2008 when it comes to programming for WM?
I'm looking to create some commercial applications for WM. For the last 10 years I'v been doing .com apps, now I figured I would do some for the mobile platform. We have all the graphics/design/marketing guys for .com, so it should work out just fine for WM.
One thing we noticed when working with exec type people is their frustration, I see exactly how we can help them resolve their frustration with WM, Symb, and java type phones...
Thanks
Click to expand...
Click to collapse
Honestly I wouldn't rush to upgrade. VS2008 is better, but doesn't add much to the WM development arena.
And if you already have VS2005 and are used to it, I would stick with that and forget about eVC++. You should give the compact framework a try. I promise you'll love it
compact framework, that's a part of the .NET isn't it?.
For the time being, for learning purposes, I think I will stick with the native for now. Once I get a grip, I will explore .net. The thing is I really don't like bulky apps for WM. Most of the apps I came across that required the .net framework were slow, any apps that use the .net with a today plug in seem to really slow down my phone.
BTW is HTC Home plug in written with the .net?
Thanks
marek, it seems to me that you are under the impression that you need VS 2005 to use MFC.
eVC fully supports MFC as well as creating DLLs and MFC DLLs.
It admit the reason I don't like VS is because I only write in native and don't like .NET languages a lot.
Since you want to create commercial apps you should note that any app created with WM 5 SKD will not be backwards compatible with WM 2003 which reduces your clients range.
You should compile with WM 2003 SDK which is forward compatible.
Our primary target audience would be WM6. We will make every effort to make WM5 compatible apps. Yes it does reduces significantly the client base, but also there are many positives...
We are still looking for more programmers for the simple concepts we have developed. I believe this will work out just fine. Having WM5 support is a "would be nice" but not required. WM5 has a bag of problems, 2003 I don't even want to touch it.
Thanks
I have to admit that I love VS because I love using .net
But VS is also a much more powerful editor in general than eVC is. It's still nice but the experience isn't as smooth as it is in newer versions, which is expected since the newer versions build on the previous ones.

Categories

Resources