Wednesday, January 19, 2005

How to get SmartPhone Emulator 2003 SE in SmartPhone

So you are trying to develop a SmartPhone (Windows Mobile 2003 SE) application in Visual Studio .NET 2003 but the install of the extra emulators does nothing for you. I finally figured it out. Here is the deal.

  1. Download the new Emulator packagefrom Microsoft.

  2. Run the install

  3. Copy everything from C:Program FilesSmartphone 2003 Second Edition EmulatorsWWESmartphone to C:Program FilesWindows CE Toolswce420SMARTPHONE 2003Emulation

  4. Restart Visual Studio and check the available emulator images .

It took me forever but post me a comment if this works for you!

Thursday, January 13, 2005

Smartphone CAB Creation

Found this little tidbit here. I've been playing around with the CabwizSP.exe and the .inf file for the whole night. Some quick points to note:

  1. The Build Cab File button in VS.NET is not working for Smartphone development coz it's pointing to Cabwiz.exe but we have to use CabwizSP.exe instead.

  2. Although it's not working, we can still press the button coz it'll help us the generate BuildCab.bat and AppName_SMP.inf

  3. Manually change BuildCab.bat so that it points to "C:Program FilesWindows CE Toolswce420SMARTPHONE 2003Toolscabwizsp.exe".

  4. Manually amend the .inf file and cut away all the ARMV4 and X86 sections, and amend the shortcuts as we like.

  5. Run BuildCab.bat from command line, it'll generate 2 .cab files in the cabdebug directory. I just chose one of them and ftp to my server.

  6. On a Smartphone or Smartphone emulator, use IE to access the cab file on the web server. It'll start downloading and install the app.

  7. We can remove the app using the Remove Program option in the Start Menu.

Tuesday, January 11, 2005

Creating Windows Service Installers

My newest project is moving along nicely. There was an earlier snag that I thought I should mention before I forgot it. In order to use a VB .NET Windows service, you must add a project installer to it. The books make this seem easy enough but I couldn't figure out how to do it. Finally, I got it. All you have to do is open the service design surface (the yellowish one) and then check properties. There, at the bottom, is a little Add Installer hyperlink. For all you VS.NET users, open your help file to


(combine the two lines before pasting)

Friday, January 7, 2005

SmartPoints for SmartPhone

I had a little down time today while I rested from coding my new project and decided to play with the Windows Mobile SDK. I was amazed at the development skills I was able to leverage thanks to the .NET Compact Framwork which, prepare to be amazed, is part of the OS in Windows Mobile 2003 SE. I love the old Weight Watchers point system and religiosly use my Palm to run wwcalc to keep track of my points. I wanted to see how hard it would be to rewrite the application for SmartPhone and it is coming along quite well. Here are some teaser screen shots:

Images gone after moving my blog.

Wednesday, January 5, 2005

Another MSMQ Service Solution

Now why did I make that so hard on myself. I started looking at that last blog and realized I have no need to create a separate thread for listening. I thought that by calling the listen event, it would cause the OnStart to hang. I called listen directly and it works like a charm.

MSMQ Async Solution

See end of post for update

I touched on this a little bit befoe but finally figured out a solution. Here is the basic code for a Windows Service that sets up a listener thread and executes it, the listener thread is responsible for adding a handler for the queue ReceiveCompleted event. Here is said code:

Tuesday, January 4, 2005

Loving the MPx220

I didn't know what kind of impact having my Outlook Syncronized calendar and contacts was going to be. I already have it on my Palm M505 but it is amazing how much more convenient it is on my phone. Most times, my Palm (the case I use is my wallet) sits in my jacket pocket. I was coding away today when my phone vibrated on my hip, I checked it and it told me it was time to pick up the kids from school, now how handy is that!

Microsoft Messaging Queue

I thought this was going to be straight forward. There are example chapters in my Enterprise Application book about creating applications that use Microsoft Messaging Queues or MSMQ. There are also chapters on creating Windows services. I figured I would marry the two and have an cool service that would process messages from the MSMQ. Unfortunately, it is not all that simple. Because I am spinning up a new thread to handle the background processing, there is a race condition that occurs when there is no waiting message in the MSMQ. I found a more detailed explanation here. I guess it's back to figuring out a better way to handle it tomorrow.

Saturday, January 1, 2005

Happy New Year!

Happy New Year! Sorry for the lack of posts over the last few days but the end of the year has been busy. I spent a lot of good time with family and friends and enjoyed a wonderful dinner at The Broker last night as well as enjoying the fireworks over downtown Denver to welcome in the New Year. Here are the pictures I took with my phone.