You may register for the Microsoft Days 2008 in Sofia from the even's web site. It will be held on 24 and 25 April  2008 at the Inter Expo Center.
The event is payed this year (again), however you will be able to hear about the latest Microsoft products and technologies for the 2 days of the event. There will be a great prizes this year - check out the detail on the Martin's blog.

If you are in the mobile development check out my sessions or just come and say 'Hi'. My sessions this year will be :

Mobile Development with Visual Studio 2008 and Compact Framework 3.5
I will talk about the latest Microsoft development tools in the mobile area. This includes the new features in CF 3.5 , the tools included in VS2008 and some of the newest SDKs and APIs

Windows Mobile for Developers
We will talk about the various features provided by Windows Mobile 6, which makes it the ultimate mobile platform these days. We will outline the features, which every developer shoud know in order to sqweese the best of it. We will discuss device security, management and provisioning and even more "trivial" features like Today screen, Auto Start, Services,Registry ,etc. Although the time of the sessions will be limited, you may drop a comment of you like me to cover a particular topic.
Posted by xman892 | 2 comment(s)
Filed under:

I had to do this summary long ago and finally found some spare time
Following are my top(by number of visits) ten posts:
1.Resolved: Explorer crash on Vista
2.CCR(Concurrency and Coordination Runtime) samples
3.Sql Server 2005: Change schema for all tables
4.“How to” Series: Automating Windows Mobile with Windows PowerShell
5.Visual Studio Toolbox Icons Mess
6.Configuring Symbol MK1100 Micro-Kiosk
7.NET Compact Framework: Mutex vs Critical Section
8.Visual Studio 2008: Device Security Manager
9.Windows Mobile Device Management
10."How To" Series: Retrieving IMSI and IMEI on Windows Mobile

Obviously my most visited posts are not related to the mobile development - May be its time to change my focus...

Posted by xman892 | 7 comment(s)

A series of "Microsoft Days" events will be held in the local(Sofia) universities as follows:
5 Nov 2007 : Technical University, Sofia , 10:00h, hall 2140, block 2
see the agenda
6 Nov 2007 : Colledge of Telecommunications and Posts
see the agenda
18 Nov 2007: University if Sofia,The Faculty of Mathematics and Informatics
see the agenda

I will talk about the newest additions in Microsoft's mobile technology stack. The session is called "Mobile Development with .NET Compact Framework 3.5". Be there if you're starving to see what to expect from Visual Studio 2008 when dealing with mobile applications

Posted by xman892 | 1 comment(s)

We will have another meeting in the local Microsoft office on 18.Oct.2007 at 18:30.
This time Valdimir Chalkov will talk about analyzing and solving problems in production environment with the help of the Debugging Tools for Windows.
The topic will be presented by Vladimir Chalkov, C# MVP and CEO of Crossroad

Posted by xman892 | with no comments
Filed under: ,
Neil will host another Mobile & Embedded Developer Skype Chat on 24.Oct.2007 at 3PM GMT.
Click here to add Outlook Reminder(via Neil's post)
You may ask the experts your mobile&embedded dev questions.

The chat may be accessed from the following url:
Note that you may say hi at any time in the chat room.

The original announcement may be found here on the Neil's blog

I just noticed that Neil got his MVP status back. Contragts Neil! You deserved it!


I just came from DevReach and decided to pour my fresh impressions over my blog.
I liked this year issue more than the previous. I guess the feedback from the previous one was analyzed and used. We had session levels this time, and many folks used it to choose the right topic for them. I attended to several sessions from level 100 to level 300 (there were not many level 400 and I was not able to attend one).
There were many presenters, who participated the last year like Stephen Forte, Carl Franklin,Richard Campbell and some local guys like Branimir, Martin ,Vlado Chalkov , Hristo ,etc.
It's good to see known faces. There were many non-bulgarian attendees and this gave the conference a cosmopolitan soul. I enjoyed again the simple and informative style of Carl and the emotional and laughed on the funny sprint of Steve.
What I was missing again is the luck of mobile dev track. Hey, mobile solutions are not another universe - they are natural extensions of every mission critical business solution!
Anyway, you guys did a great job this year!
I already expect the next one.
Here comes some low-quality :-D pictures from my phone's camera:


Posted by xman892 | with no comments
Filed under: , ,

I was too busy lately in order to blog and read blogs(never do this at home). I had to "read" hundreds of posts, which popped out of my agreggator. I decided to post a bunch of links that came to my attention.

There were other interesting ones ... stay tuned for more.

Posted by xman892 | with no comments
Neil will host a CF.NET chat on Skype the next Wednesday, Aug 29 2007 from 6:00 pm to 7:00pm (London)
CF.NET team members, MVPs and epxerts will hang out there. if you have device development questions this is the place to find the answers.

You may enter the chat at

Click here to update your Outlook calendar

The Bulgarian timeframe of the chat is from 20:00h to 21:00h

Check out the Neil's announcemnet for few more details.
Posted by xman892 | 1 comment(s)


I use HTC P3600 as a phone/PDA which is armed with Windows Mobile 5.0.
The device has a camera, 3G,WiFi,Bluetooth and more. It does not have a GPS(officially).
I noticed recently that the guys from have published Windows Mobile 6 image for Trinity.
It is important to note that HTC does not provide official upgrade for P3600.

So, I read some posts on the xda forums and finally managed to upgrade my device. I have now WM 6 on my P3600 and the most interesting part is that I have a GPS support.
I followed these steps:
1. Downloaded the WM6 image and ROMUpgrade utility on the PC:
Check out other available WM images here:

2. Downloaded the following tool(SSPL-TRIN.exe) on the PC.
It allows to bypass the CID and signature check. Download link:
The following post gives more details:

3. Connected the device to PC
4. Copied SSPL-TRIN.exe on the device
5. Launched SSPL-TRIN.exe from the device.
The screen turned-off anf a strange colorful screen appeared(bootloader mode)

6. Launched the ROMUpdateUtility.exe from the PC
I performed the upgrade on Vista so I needed to download the ROMUpdateUtility for Vista:
I just needed to replace the extracted files from Step 1

7. Followed the steps provided by the ROMUpdateUtility
And ops! I have the WM6 on my device! The big surprise is that the device has now a GPS support!

  • it is a risky operation and you may render your device unusable. Do it on your own risk
  • do not launch any application on your PC during the upgrade process
  • do not disconnect/turnoff the device
  • do not restart/turn off PC
  • make sure you have device battery charged over 50%
  • disable PC hibernate/sleep features - or just move the mouse to prevent it
  • carefully read the redme.doc before starting the upgrade process

More info may be found on the following places:

Windows Mobile 6 Image for Trinity
SSPL-Trin - tool to bypass the CID/signature checking
ROMUpdateUtility for Vista
Trinity Wikki
Trinity and Windows Mobile 6 Forums

Posted by xman892 | 4 comment(s)
Filed under: ,

There was a question in the forums, if there is a way to configure a network adapter automatically - without an user interaction. Using the UI, the user may select "My network card connects to" value for every adapter in the adapters list. It may be changed to point one of the available network destinations like "The Internet" , "Work", etc. So, is there a way to this automatically?

In short the answer is YES! There is a way. We may prepare an OMA Client Provisioning File and pass it to the appropriate configuration provider in Windows Mobile.




An appropriate configuration file would be like this:

    <characteristic type="CM_NetEntries"> 
        <characteristic type="Adapter Name"> 
           <parm name="DestId" value="{A1182988-0D73-439e-87AD-2A5B369F808B}"/>              
           <parm name="Adapter" value="Qualified Name"/>   

This file will bind a network adapter named "Adapter Name" to the "Work" destination. We have to change the "Adapter Name" value with the name of the adapter as it is seen in the adapters list. The "Qualified Name" should be changed with the fully qualified name of the adapter - it may be obtained by using the GetAdaptersAddresses routine.
If we want to change the destination to "The Internet" , we have to supply different GUID for the DestId parameter.
Following network identifiers as configured by default on Windows Mobile:

The Internet: {436EF144-B4FB-4863-A041-8F905A62C572}
Work: {A1182988-0D73-439e-87AD-2A5B369F808B}
WAP Network: {7022E968-5A97-4051-BC1C-C578E2FBA5D9}
Secure WAP Network:{F28D1F74-72BE-4394-A4A7-4E296219390C}

What we have to do in order to apply this configuration setting? We have the following options:
1. Preparing the provisioning Xml file , save it as _setup.xml, and place it inside a CAB file. We may "execute" the file on the device, then. Check out this post for details about deploying provisioning files with CABs.
2. We may apply these settings through code(Compact Framework) by using the managed Microsoft.WindowsMobile.Configuration.ConfigurationManager class from Windows Mobile 5 SDK:

            string configurationXml = "<wap-provisioningdoc><characteristic type=\"CM_NetEntries\">"+
           "<characteristic type=\"Adapter Name\"><parm name=\"DestId\" "+
           "value=\"{A1182988-0D73-439e-87AD-2A5B369F808B}\"/><parm name=\"Adapter\" value=\"Qualified Name\" /> "+ 
            // Load XML
            XmlDocument configurationXmlDoc = new XmlDocument();
            // Send to Configuration Manager
            ConfigurationManager.ProcessConfiguration(configurationXmlDoc, false);
Also the unmanaged version DMProcessConfigXML may be used Check out this post for unmanaged wrapper of DMProcessConfigXML

CM_NetEntries Configuration Service Provider Examples for OMA Client Provisioning
Injecting Provisioning XML into a cab using VS 2005 on the Windows Mobile Blog
DMProcessConfigXML on the Marcus Perryman's WebLog
Windows Mobile Device Management for more configuration options

In my post “How to” Series: Windows Mobile Security Configurations, I said that if you want to deal with the device security configurations you may download the Security Configuration Manager Powertoy for Windows Mobile.(there are some other options as well)

If you have the Visual Studio 2008 Beta 2 installed, you do not need this powertoy anymore. It is part of VS 2008,now.

Just cradle the device( or emulator) , launch the Device Security Manager and start locking,unlocking and installing device certificates :).


I just noticed Mark Arteaga has collected some resources related to Windows Mobile Security. Check them out.

“How to” Series: Windows Mobile Security Configurations
Windows Mobile Security resources from Mark Arteaga


I noticed recently, that some guys asked(in the forums) how to read the device owner information from .NET Compact Framework. The Device Owner information may be obtained from the device's registry.






It is stored under the following registry key: HKEY_CURRENT_USER\ControlPanel\Owner.   Note that, this key may be missing on a fresh device. The key is populated after the owner sets his/her information.
The registry key HKEY_CURRENT_USER\ControlPanel\Owner has two interesting values: "Owner" and "Owner Notes". These values holds binary data. The "Owner" value contains the following owner information attributes: Name, Company, Phone, E-mail, Address. The "Owner Notes" value contains the Notes of the owner :)
Reading Owner notes is simple like:
RegistryKey key = Registry.CurrentUser.OpenSubKey("ControlPanel\\Owner");
byte[] data = key.GetValue("Owner Notes") as byte[]; string notes = UnicodeEncoding.Unicode.GetString(data, 0, data.Length).TrimEnd('\0');


The tricky part is to "decode" the "Owner" binary data, which contains multiple fixed-length values. In order to deal with it , we have to know the exact length of every device owner attribute:

  • Name: 72 bytes
  • Company: 72 bytes
  • Address: 372 bytes
  • Phone: 48 bytes
  • Email: 74 bytes

So, reading the "Owner" info is easy as:

RegistryKey key = Registry.CurrentUser.OpenSubKey("ControlPanel\\Owner");
byte[] data = key.GetValue("Owner") as byte[];
string name = UnicodeEncoding.Unicode.GetString(data,0,72).TrimEnd('\0');
string company = UnicodeEncoding.Unicode.GetString(data,72,72).TrimEnd('\0'); string address = UnicodeEncoding.Unicode.GetString(data, 144, 372).TrimEnd('\0');
string phone = UnicodeEncoding.Unicode.GetString(data, 516, 48).TrimEnd('\0');
string email = UnicodeEncoding.Unicode.GetString(data, 566, 74).TrimEnd('\0');

You may obtain the full source code from here

Fig 1. One Column Layout

I had a complaint from a customer of mine, that the Internet Explorer Mobile(Windows Mobile 5.0)
does not render their HTML reports in a tabular form. At first, I was wondering if they found a defect in
our custom HTML exporting feature.

Then I realize what happened.
We're using a sequence of TABLE,TR and TD tags
to have our HTML content rendered into a tabular form. Some of the users accidentally had switched on
the One Column feature of the Mobile Internet Explorer.
This layout forces the Mobile Internet Explorer to render all content in a single column
without horizontal scrolling.




Fig.2: Default layout

IE Mobile Team Weblog
Wikipedia for IE Mobile

Posted by xman892 | with no comments
Developing and deploying a software solution is almost never a single act.
After the solution is deployed, it has to be monitored and continuously updated to meet the ever-changing business environment.
So, what we developers do is to utilize existing or implementing a custom strategy for automatic software updating.
However, sometimes the business needs to update not only a particular application, but also changing the application environment (underlying OS for example).
The remote computer management is a common practice(there are a lot of tools) these days.
However, the remote management of mobile devices(like PDA-s and smart phones ) is not so common.
For example on the Windows platform, we have a Remote Desktop and Terminal Services out of the box.
And this is not the case for the Windows Mobile devices (there are third party solutions).

Fortunately, there is a solution for this kind of problems, when dealing with Windows Mobile based devices.
The out-of-the-box solution is called Windows Mobile Device Management. Windows Mobile provides infrastructure for remote
management based on an industry standards published by Open Mobile Aliance(OMA) . Windows Mobile devices support
additional extras as well - not mentioned in the OMA specifications. The term used in the literature is actually provisioning.
Windows Mobile supports 2 OMA standards for provisioning: The first one is based on a client-server conversation by using a communication session between the device(client) and a special DM(device management) server.
During this conversation the server may query device in order to get data from it and may send provisioning instructions to change particular settings over the device.
The communication is based on TCP/IP ,so any TCP/IP capable infrastructure may be used(GPRS,WiFi,...). This post will not talk about this kind of provisioning...
The second one called OMA Client Provisioning is based on deploying(sending) a special xml file on the device ,which contains provisioning instructions.
There are various instructions supported by Windows Mobile, which allows for:
- Managing connectivity (GPRS,VPN,WiFi,...) settings of the device
- Managing e-mail accounts in he Pocket Outlook
- Managing Pocket IE favorites
- Managing device registry(adding,modifying and deleting registry keys)
- Managing security settings
... and even more...

The instructions are grouped by functional areas and referred as Configuration Providers. The Configuration Provider actually is the software component, which processes particular type of instructions. Check out the available configuration providers. The provisioning files may be delivered to the device throughout the following channels:
  • ROM image
    provisioning files may be deployed in the device's ROM and applied on cold boot.

  • RAPI and ActiveSync
    the rapiconfig.exe is placed in the tools directory of the SDK
  • Deployment as .CAB or .CPF file
    Provisioning files may be packaged in a CAB files and deployed on the device like any other CAB file( ActiveSync,LAN, SD/MMC card, etc)
  • OTA (Over-the-air)
    Provisioning this includes various techniques like DM Server, WAP Push, SMS, E-mail, HTTP(web site download)
  • Custom file delivery and the Windows Mobile Configuration Manager API
    The developers may use the managed WindowsMobile.Configuration.ConfigurationProvider (Part from the Windows Mobile 5 SDK) to "execute" provisioning files. Your application may receive provisioning files through various comm channels( SMS, E-mails, Web Services ,... what ever) and pass them to the configuration provider for execution.
Open Mobile Aliance
OMA DM Provisioning for Windows Mobile
OMA Client Provisioning for Windows Mobile
Configuration providers supported by Windows Mobile
Managing Windows Mobile 5.0

I had to retrieve the IMSI and IMEI on Windows Mobile for a particular project.
What I needed actually was the IMSI , because it may be used in OMA Client Provisioning through WAP Push scenarios. It may be very practical for the enterprise to manage its devices remotely and I will post more on that topic later on.

In order to retreive IMSI and IMEI, one have to deal with the Telephony API and PInvoke.
In general the magic is done by invoking the native lineGetGeneralInfo routine from TAPI.

You may download the full source code from here
the original code article may be found here

There is another approach as well - buy the Telephony library from OpenNETCF

What is IMSI
What is IMEI
OMA Client Provisioning for Windows Mobile
The sample source code

More Posts Next page »