Beginner's pointers? - Windows Mobile Development and Hacking General

Hi chaps,
I've just got myself an O2 XDA Orbit - great device, and now I'm looking for developing for it - just simple things at first, like a Blackjack game, or a simple Today feature with the sun and moon times on it; this sort of thing.
I've got Visual Studio .NET 2003, but I see that in order to program the latest devices, you need VS 2005 (?). So, I've downloaded Embedded Visual Studio C++ v4 with all the SDK's and I'm hoping to develop for an earlier version of Windows Mobile, and hope that it works.
So while I've got all that, I'm now stuck as to where to start! Can anyone point me to a good book, or something online which will help me through a simple CE application? How you do get the Today screen working, for example? I realise that this might be asking a lot, but a couple of pointers would be great - if you could!
Many thanks,
MrP.

I'm just starting out myself with windows mobile programming. You can find a lot of info from msdn. Here is an example Hello app.
http://msdn2.microsoft.com/en-us/library/ms912017.aspx
You can find a lot of good stuff at the code project site also.
http://www.codeproject.com/ce/
eVC has wizards that will get you going. One thing I found out about using eVC is that you won't be able to debug your programs on a WM5/6 device since the SDK's are not compatible with them. It can be a bit of a challenge to fix bugs without a debugger. I can't get the debugger to work with the emulator either for some reason.
A question for other eVC developers out there. Is it possible to use the emulator to debug programs or do you all have an old PPC2003 device that you use to do your debugging? Or have you all moved on to VS2005?

I've bought visual studio 2005 standard and it is great - it fully supports WM5/6 (with sdk) and runtime debugging - for .exe it works well but I have problems with .dll - I can't debug dll files - does anyone know how to make it?

Pleas look up threads started by vijay555.
He wrote a comprehensive article on the tools and possibilities to begin developing for these devices.
Just as a quick side note:
There is no need what so ever to pay M$ money for VS 2005 if you want to develop in C / C++.
Apps written in eVC++ 4 will work perfectly with WM 5 and 6 and if you need any missing API (not many of those) you have 2 choices:
1) Manually unpack the SDK and link to it.
2) Use implicit linking (that LoadLibrary and GetProcAdress).

levenum said:
Pleas look up threads started by vijay555.
He wrote a comprehensive article on the tools and possibilities to begin developing for these devices.
Just as a quick side note:
There is no need what so ever to pay M$ money for VS 2005 if you want to develop in C / C++.
Apps written in eVC++ 4 will work perfectly with WM 5 and 6 and if you need any missing API (not many of those) you have 2 choices:
1) Manually unpack the SDK and link to it.
2) Use implicit linking (that LoadLibrary and GetProcAdress).
Click to expand...
Click to collapse
Sorry about the delay in replying...
Many thanks for the pointers.. Just a matter of starting now!

Related

The simplest question of all...

OK, here's one that you should all be able to help me with.
I am a programer, but have not yet begun to create programs for my XDA 2i. I REALLY don't know where to start... I bought MS C++ .NET with the possibly misguided impression that it was supposed to be rather like the Java virtual machine, and that I could simply whip up an exe on my PC then move it to the PPC and it would just work...
But now I'm SO confused. What's all this about SDKs and having different ones for different versions of Windows mobile? And then there's the compact .NET framework, and then there's ASP, but I'm fairly comfortable that that's a different issue entirely.
SO MY QUESTION IS THIS:
What is the simplest way for me to begin writing C/C++ programs to run on my XDA 2i? I'm not interested for the moment in phone or other connection aspects - let's say I'm trying to write a visual calculator. So simple logical operations and a simple GUI.
I have experience with MS visual studio C++, and I can use libraries when told which ones to use, but am otherwise uninterested in them.
I gather the absolute simplest solution might be to write some JScript, but I want to use .NET C++ since I forked out for it.
The trouble is, there's so much info out there. Please help, then maybe one day I can start contributing useful info to this site too.
Thanks everyone!
Phil Drew
questions and answers much like yours
http://forum.xda-developers.com/viewtopic.php?t=21786
http://forum.xda-developers.com/viewtopic.php?t=21649
download Visual Studio 2005 Beta 2 from Microsoft.. if you are a member of MSDN

Reading the registry with Visual Studio 2003

I'm developing a small application for my HTC Wizard, which I'm programming with Visual Studio 2003.
I need to open the shell application for M3U files, which I've tracked down to HKCR\M3UFile\Shell\Open\Command... but now I can't figure out how to either read that key to open the relevant player, or to execute the m3u file directly.
Because I'm using VS2003, I don't have access to system.win32 with the compact framework, so what techniques have others of you used to read or write to the registry?
Also, just as a side note, how do you find the current path?
Thanks,
Jon
There is no real concept of current path in CE. If you want to know the path your EXE is in, use GetModuleHandle(NULL) -- it'll return the fully-qualified path name of that process's EXE, from which you can parse out a path.
I'd advise against using the compact framework; .Net is a loser on PPCs as it just slows things down, taking up extra memory & cycles on a platform where both are in short supply. Use the real Windows APIs instead -- i.e. call RegCreateKeyEx/RegSetValueEx.
And if you choose to use Win32 API you can just call ShellExecuteEx()
and not mess with the registry.
RegQueryValueEx is what you need. Just set the appropriate type and buffer.
V
I'm always willing to learn new stuff... are there any good resources on programming for PPC without using .net?
I know there's EVC++, but I've installed it, and now I don't know what to do with it!
Regards,
Jon
JonTheNiceGuy said:
I'm always willing to learn new stuff... are there any good resources on programming for PPC without using .net?
I know there's EVC++, but I've installed it, and now I don't know what to do with it!
Regards,
Jon
Click to expand...
Click to collapse
You can either use EVC++4, which is free but has an aged, not-so-standard C++ compiler (since it based on VC++6...but it only means a few quirks), or you can use Visual Studio 2005 which is supposed to replace EVC.
Jon, not to state the obvious, but there are many c++ tutorials for the PPC on the interweb.
What kind of experience do you have?
V
I have no prior experience with C++ - I bought the C++ For Dummies book in a charity shop a month or so ago, but it seems to refer to software that isn't available any more!
My core experience is with PHP, and recently I've been more interested in VB.NET for small apps at work, but most of what I want to do is with Windows Mobile - for which, all I have is Visual Studio 2003, and my co. won't fund me buying VS2005 as I got it for an old project that I still maintain, and anything new I need to write for work I can do with VS2005 Express...
That said, I'm not afraid of learning a new language, especially something as powerful as C++.
C++ for dummies is excellent, the best I've come across so far.
Have a read through this:
http://forum.xda-developers.com/viewtopic.php?p=209136#209136
I'm currently unlearning and then relearning my c++ - one thing I've learnt coming from other languages - c++ requires discipline. It's not about shortcuts, you build up from the basics and keep going steadily. But you need to be logical, and prepared to put in the effort. So discipline - it's been a long time since I've had to think about that!
V

newbie: creating appl. for xda pocket pc 2002

hello,
glad that i found this forum
new user of an xda Wallaby, i got a few questions,i would be happy if someone could help me. so sorry again for my boring questions.
is the pocket pc software separated from the phone software ? possible to get into the phone software?
i have little experience with basic and c. which development kit is okay , i saw Visual C++ for CE but thats a big cake for me, i would shot me in this, but only if this is the right thing. i look for a language with a phone software library, (and sorry for my bad english)
Thank You
edlin
Welcome to the forum.
First of, please don't worry about language here. This is a global forum and we have people from all over the world here.
Second, do you have any experience in programing for desktop windows?
Programing for Windows Mobile (it is actually a bit different from clean Windows CE) is basically Win32 programing so you need to familiarise yourself with that.
Now, the thing is that Pocket PC 2002 i a bit of an outdated system. Forunately, it is still supported.
What you need is a collection of free tools from Microsoft which you can download here. You also need Pocket PC 2002 SDK.
This collection includes 2 compilers eMbedded Visual basic and eMbedded Visual C++. I recommend using C++ as it is more powerful and doesn't need that pesky run time support VB uses. If you have any experience with Visual Studio 6 you will find the tools easy to get used to.
As for the 'phone software' it is part of windows, but using it involves more advance programing. First of you need to know how to use Win32 API. You can find documentation on TAPI (Telephony API) and RIL (Radio Layer Interface) in MSDN.
Good luck!
hello levenum,
thank you for your "Welcome"and Your helpful posting.
i first thought that it would perhaps be easier to go with an earlier version like CE 3, but then i have more troubles with cpu specific code?
i only tasted borland c 2.0 for dos and boland c++ 5.i saw a developers interface from a friend, Visual C++5, with Extension for Writing CE Applications,
I followed Your Download-Links, could not download Pocket PC 2002 SDK cause WGA Plugin failed i surf with a mac. i will find a solution )
so i will think on your words "First of you need to know how to use Win32 API" and step into Visual C++ first, thats a live step.
Thanks for Your Helpful Hints.
Greetings,
edlin

WM5 applications

How to write a WM5 application?
I installed all necessary things, but i cannot find reference on develop those things in MS...
Any simple tutorial i can learn from web?
Have you installed the sdk? Many example apps + code on SMS.
V
what is SMS?
Sorry I misread. You said MS - you mean Microsoft?
Same applies. Search this forum - you're not the first person to ask this question and several people have given thoughts.
Get the sdk and read and read!
V
i have searched the forum but get nothing.
i installed all necessary software, sdk.
the only thing i want to know is the function library...
pls help.
Define 'all necessary software' please.
What IDE you are using (VS 2005, eVC)?
The search function on this site is lousy, so I recommend you search through google with the site:www.xda-developers directive.
The (very) short version of it is:
For VS 2005 - create a smart device project
For eVC - Create any project with Pocket PC / Pocket PC 2003 SDK
All necessary libraries will be added automatically by the wizard.
there really is no simple answer to your question
only more questions
do you wanna do it in .net ?
if so do you wanna do it in c# or vb (dog forbid! ) or c++
do you wanna do it in microMFC ?
do you wanna do it in pure win32
developing for pocketpc's are 99% the same as developing for a normal pc

Creating a today plugin

Hello everybody. I am a programmer experienced in various languages. I want to create a very simple today-plugin, a launcher. It should be touch-responsive, to gestures to be more accurate. Target platform is Windows Mobile 6.1 Pro. I don't want to use wrappers and user-made frameworks and stuff for this, I want to write a professional app. .NET Framework is okay but I don't want to use technologies that are not made by Microsoft. Period. Okay now what I need to know is how do I do this? First I need to know which apps to get. I suppose I will need Visual Studio? Which Version? I'm downloading "Windows Mobile 6 SDK Refresh Kit" at this time. How do I proceed? Is there any sample code? I'm not looking for a huge file. I would like a quick success. Maybe I'll go into some more detail: Basically I want a fully transparent plugin, 480 x 480 px. Users should be able to move their finger from the center in 8 directions and the plugin will then launch the program associated with that direction. That's it. I hope you can help me with this. By the way, I have used the search function and I have found some threads and followed most links I encountered but it's not up to date or not what I want, so frogive me for posting another thread.
hi,
First of all, you can't use .NET Compact Framework for Today Plugin development. It has to be C++ native code AFAIK because it's a .dll - you can't have managed code DLLs.
You need Visual Studio with Smart Device Project support. I'm using VS 2008 Professional, because that's the only version that has it. Standard, Express etc doesn't have that.
You'll need that WM 6 SDK you're already downloading.
Visual Studio has a very nice Device Emulator if you don't have a device to use, but you need to download device emulator images with windows mobile 6. It's somewhere on MSDN in separate package.
I don't have any experience in today plugin development, but I'm sure you'll find a lot of resources and articles about it on:
- http://msdn.microsoft.com
- http://social.msdn.microsoft.com/Forums/en-US/category/smartdevicedevelopment
- http://codeproject.com
You could start off by reading the sticky!
http://forum.xda-developers.com/showthread.php?t=445396
ather90 said:
You could start off by reading the sticky!
http://forum.xda-developers.com/showthread.php?t=445396
Click to expand...
Click to collapse
I DID see this thread, but I don't want to search download install and configure 20 apps out of which I only need 2 for my purpose. Thanks to grzegorzaksamit for the information. I will organize VS 2008 then. Any other help regarding the actual development is highly appreciated!
Firefall! said:
I DID see this thread, but I don't want to search download install and configure 20 apps out of which I only need 2 for my purpose. Thanks to grzegorzaksamit for the information. I will organize VS 2008 then. Any other help regarding the actual development is highly appreciated!
Click to expand...
Click to collapse
There is an example in either the WM5 or WM6 SDK.

Categories

Resources