Get Email UID

Joined
Apr 3, 2009
Messages
1
Reaction score
0
[font='Tahoma','sans-serif']

Hi all,

I need to get the email message UID, the info from Outlook Spy RemoteEID
(POP://mail.server.net/AAwkiHAAAAAQJA3rlr8nwKEtPXJejQpa)
I am writing a Pocket Outlook Menu Extension.
I have a pointer to the selected email message, and I am able to get the PR_SUBJECT, PR_MESSAGE_DELIVERY_TIME and other properties, but not the UID.

I tried GetIdsFromNames with the GUID from OutlookSpy, and then GetProps, but it’s not working.

Here is the code I used:
GUID OutlookGUID1 = {0x00062014, 0x0000, 0x0000, 0xC0, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x46};
MAPINAMEID sNameID = {0};
LPMAPINAMEID rglpNameID[1] = {&sNameID};
sNameID.lpguid = &OutlookGUID1;
sNameID.ulKind = MNID_ID;
sNameID.Kind.lID = 0x8F01;
LPSPropTagArray lpPropTags = 0;
hr =m_pMessage->GetIDsFromNames(1,rglpNameID,0,&lpPropTags);
LPSPropValue lpSPropValue = 0;
ULONG ulPropTag = lpPropTags->aulPropTag[0] | PT_BINARY;
ULONG arrMsgTags[] = {1, ulPropTag};
hr = m_pMessage->GetProps((LPSPropTagArray)arrMsgTags, MAPI_UNICODE, &cValues, &pPropValues);

Thank you,
Ioana


[/font]
 

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

Top