BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: MAPI OleVariant to EntryId ?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Dmitry Streblechenko
Guest





PostPosted: Thu Jun 26, 2003 9:23 pm    Post subject: Re: MAPI OleVariant to EntryId ? Reply with quote



1. Use MAPIUtils.HrArrayToString() or loop through the returned array and
convert each element (byte) into 2 bytes hex string.
2. After calling Namespace.CreateRecipient, do *not* call
Recipient.Resolve - Namespace.GetSharedDefaultFolder can work with an
unresolved recipient just fine and will resolve it anyway without causing a
security prompt.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"Oliver Giesen" <ogware (AT) gmx (DOT) net> wrote

Quote:
I'm increasingly feeling like I must be exceptionally thick... :(

I used Redemption's MAPIUtils.HrGetOneProp to read the
PR_IPM_SENTMAIL_ENTRYID of a message store. Now I'd like to open that
folder
using IMAPISession.OpenEntry(). Problem is: How do I bring the OleVariant
I
got from HrGetOneProp into a form that I can pass to OpenEntry?

And while I'm at it, although this is rather Redemption-specific:
I'd like to use the _Namespace.GetSharedDefaultFolder but it expects a
Recipient object and Redemption's SafeRecipient is neither compatible nor
does it seem to contain a pointer to a real Recipient object. Using a
standard Recipient results in the $§@?% security warning that prompted me
to
use Redemption in the first place. How do I do this?

Cheers and TIA and also for the great support by Dmitry and Yorai so far,

Oliver
---- ------------------
JID: [email]ogiesen (AT) jabber (DOT) org[/email]
ICQ: 18777742
(http://wwp.icq.com/18777742)




Back to top
Oliver Giesen
Guest





PostPosted: Thu Jun 26, 2003 11:47 pm    Post subject: Re: MAPI OleVariant to EntryId ? Reply with quote



Quote:
1. Use MAPIUtils.HrArrayToString() or loop through the returned array and
convert each element (byte) into 2 bytes hex string.

Argh! I feared it would be something as obvious as this. Works great now
(although I still wasn't able to use OpenEntry - I had to take the iterate
folders and compare ids route)!


Quote:
2. After calling Namespace.CreateRecipient, do *not* call
Recipient.Resolve - Namespace.GetSharedDefaultFolder can work with an
unresolved recipient just fine and will resolve it anyway without causing
a
security prompt.

Ah! That's what you get for sticking too close to the sample code... without
that I wouldn't even have known that I *might* have to resolve the
recipients...

Anyway thanks a *big* lot!

Now everything except one teensy issue is working (see my other post). Looks
like I might make the deadline after all. Nevermind the unpaid overtime...
;)

Cheers,

Oliver
---- ------------------
JID: [email]ogiesen (AT) jabber (DOT) org[/email]
ICQ: 18777742
(http://wwp.icq.com/18777742)


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.