views:

580

answers:

1

In the Windows Mobile SDK, there is a MessagingApplication class in Microsoft.WindowsMobile.PocketOutlook that has a method "DisplayComposeForm" that allows you to bring up the default compose dialog for sending an SMS.

I need a way to display the default message viewing dialog from managed code. I.e. i've retrieved the message via MAPI, but now I want to show it using the default message viewer in Windows Mobile.

Anyone know how to do this?

+1  A: 

Thanks to some clever googling, I've stumbled on the answer.

Use P/Invoke to access the MailDisplayMessage method in the MAPI API.

The P/Invoke signature is as follows:

[DllImport("cemapi.dll")]
internal static extern int MailDisplayMessage(byte[] lpEntryID, int cbEntryID);

For managed access to the message stores, you can use the free MAPIdotnet project.

rusvdw