Groups | Blog | Home
all groups > dotnet compact framework > november 2007 >

dotnet compact framework : Converting InTheHand SmsMessage to Microsoft SmsMessage



ctacke/
11/7/2007 5:41:03 PM
Have you checked with Peter (InTheHand owner and developer)? He'd certainly
know.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


[quoted text, click to view]

jonfroehlich
11/7/2007 5:51:18 PM
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...
jonfroehlich
11/8/2007 1:48:11 AM
I posted on the InTheHand forums but have not received a reply. I'll
email Peter directly now.

Thanks Chris,

Jon

http://csharponphone.blogspot.com

[quoted text, click to view]

AddThis Social Bookmark Button