free web page counters

Windows Mobile Pocket PC Smartphone Programming

==>Click here for the SiteMap<==. Original contents with decent amount of source codes.

Sunday, February 12, 2006

TransportDemo sample in Pocket PC 5.0 SDK does not work? Check the solution here...

====>SiteMap of this Blog<===

TransportDemo sample in Pocket PC 5.0 SDK does not work? Check the solution here...

I am going to start a new category "Outlook and MAPI related". I have been developing a customized mail transport for Pocket Outlook for quite some time, and have programmed MAPI extensively.

A good start to learn how to write a customized mail transport is to read the TransportDemo sample shipped in both Windows Mobile 2003 SDK and Windows Mobile 5.0 SDK. It gives the reader good heads-up what important methods to implement (IMailSyncHandler), what to export in the transport DLL (OneStopFactory), and how to register the transport in registry. The sample does not really synchronize a mail account, nor does it send outgoing emails. And, the sample does not show how to programmatically provision a new mail account based on the customized transport (a possible new blog post here?); rather, it anticipates the reader to manually create one via Pocket Outlook's New Account Wizard.

With all the above being said, I found that I could not create a new account in Pocket PC 5.0 emulator. I tried both manual creation using Outlook's New Account Wizard, and programmatic way using DMProcessConfigXML. The account simply does not show up. Soon I realized the account WAS created, but was NOT listed in Outlook, based on the following three reasons:

  • Since I had already worked on a customized transport in Pocket PC 2003 and Smartphone 2003 for quite some time, I was pretty sure that I built the DLL and registered the transport in the registry correctly.
  • Further, the account must already have been created, as I could not created a second one with the same name.
  • Further, I could easily query back the account information using DMProcessConfigXML.

A quick google group search reveals three fellow victims:

None of them found the solution. So I was on my own here. Why the account was created but could not be displayed? Could it be caused by the fact that I did not sign the DLL, as Pocket PC 5.0 is most probably a "one-tier-prompt" device (security-related, another big category in my mind)? Soon I dismissed this possibility. I tried two methods to rule out the security concern. First method was to sign the DLL using the SDK privileged certificate ("SDKSamplePrivDeveloper.pfx"), and load the certificate to the emulator (how? a possible new blog post). Second method was to disable security settings in the emulator (how? a possible new blog post). In both cases, the account simply refused to show up.

In despair, I wrote a small program to load my own DLL and call the function "OneStopFactory". Arrrr... LoadLibrary() failed!! Till this point, I knew the reason: Certain DLLs must be missing in the emulator. After running depends.exe (although in my desktop PC, but still emitted some traces), I found that "msvcr80d.dll" is required. So I copied it from my desktop ("C:\Program Files\Microsoft Visual Studio 8\VC\ce\Dll\armv4i") to the Pocket PC 5.0 emulator. Upon restarting Pocket Outlook, all previously-created accounts showed up.

Category: [Outlook / Transport / MAPI]

====>SiteMap of this Blog<===




[ [permalink] ]

5 Comments:

At March 28, 2006 11:21 PM, Anonymous Anonymous said...

Hi, we've read your solution and try it on our project. It seems doesn't work either. Here we can create a new account manual using wizard. But cannot create automatically. Could you please kindly give us some advise how to resolve?

Thanks.

 
At March 29, 2006 12:32 PM, Blogger Lao K said...

Jeffery, I am more than happy to help. Could you give me more details, like which of the following was the issue:
- you do not know how to programmatically create a mail account (using DMProcessConfigXML)?
- or, you have the code but DMProcessConfigXML returns an error?
- or, you have the good code, but the account does not show up?
And, are you building in debug mode or release mode?

The more, the better I can help.

 
At July 19, 2007 12:13 AM, Anonymous Anonymous said...

Get 20% Discount for all PocketPC, Palm, Symbian, Blackberry

20% Discount for all PocketPC,Palm, Symbian, Blackberry Software, Ringtones, Games, Themes, Wallpaper at explorepda.com


Website : http://www.explorepda.com

Use this Discount Code : DEALMONTH

Offer open for Limited Customers only.Hurry!!

explorePDA.com - Palm, Pocket PC, Windows Mobile, Smartphones, Symbian, BlackBerry software at [url]www.explorePDA.com[/url]. New submissions daily! Special Discounts monthly!

 
At December 10, 2007 1:17 AM, Anonymous Anonymous said...

What must the name of the Remote Executable be for the TrabsportDemo project ?

 
At October 16, 2008 3:09 AM, Blogger Unknown said...

I tried your solution. I am able to create account using DMProcessConfigXML, but it is not visible in Messaging. I tried loading both Debug as well as release of TransportDemo.dll

 

Post a Comment

<< Home