Converting InTheHand SmsMessage to Microsoft SmsMessage

  • Thread starter Thread starter jonfroehlich
  • Start date Start date
J

jonfroehlich

I would like to convert a
InTheHand.WindowsMobile.PocketOutlook.SmsMessage to a
Microsoft.WindowsMobile.PocketOutlook.SmsMessage. For example

public static Microsoft.WindowsMobile.PocketOutlook.SmsMessage
Convert(SmsMessage inTheHandSmsMessage)
{
//the inTheHandSmsMessage.ItemId is a MAPI Entry ID, which is 20
bytes
//but the Microsoft ItemId class expects an integer!
Microsoft.WindowsMobile.PocketOutlook.ItemId itemId =
new
Microsoft.WindowsMobile.PocketOutlook.ItemId((int)inTheHandSmsMessage.ItemId.Value);

Microsoft.WindowsMobile.PocketOutlook.SmsMessage msSmsMessage =
new Microsoft.WindowsMobile.PocketOutlook.SmsMessage(itemId);

return msSmsMessage;
}

However, the Microsoft version of SmsMessage expects an integer for
its constructor. I can't figure out how to convert the MAPI Entry ID
of the InTheHand SmsMessage to an integer. It's 20 bytes! Is
converting from one SmsMessage class to the other even possible? It
would really simplify things if it were...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top