locked
What is the cost of IExchangeManageStore::EntryIDFromSourceKey? Does it make any RPCs? RRS feed

  • Question

  • Hi,

    What is the cost of IExchangeManageStore::EntryIDFromSourceKey? Particularly, does it make any RPCs? We store folder and message
    source keys and often use this call to get ENTRYID to open messages. Wondering if we should store it instead of source keys.

    Thanks
    -Praveen
    Saturday, October 23, 2010 10:45 AM

Answers

  • Yes, I believe it does make an RPC call. You can be sure by setting a breakpoint before your call, start a network capture (NetMon, Wireshark, etc), then step over your call and see if any RPCs were created. There are dangers in storing Entry IDs though. For example, you don't know how long they might be: http://support.microsoft.com/kb/230749 and the entry id could change for what you perceive to be the "same" message (see my blog article).
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Patrick Microsoft Online Community Support
    Tuesday, October 26, 2010 2:01 PM

All replies

  • Yes, I believe it does make an RPC call. You can be sure by setting a breakpoint before your call, start a network capture (NetMon, Wireshark, etc), then step over your call and see if any RPCs were created. There are dangers in storing Entry IDs though. For example, you don't know how long they might be: http://support.microsoft.com/kb/230749 and the entry id could change for what you perceive to be the "same" message (see my blog article).
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Patrick Microsoft Online Community Support
    Tuesday, October 26, 2010 2:01 PM
  • Thanks for your response.  I'm glad you brought the issue about ENTRYID changing.  We actually store PR_SOURCE_KEY of messages and folders for referencing later.  I was thinking of switching to PR_ENTRY_ID (because it is simpler and I only have to deal with one value instead of 2).  I won't then.  Do the source keys (of messages and folders) also change as well?

    Thursday, October 28, 2010 8:03 AM
  • Are you sure? A message id is just a prefix (4 + 16 bytes), a few flags plus the source keys of the message and the parent folder.

    I remember playing wiht this years ago, and I don't think I saw any RPC traffic caused by that call.

    Why is the RPC call needed?


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Thursday, October 28, 2010 4:33 PM
  • No, Dmitry, I'm not sure - just guessing. It should be easy enough to test, though. That's a minor point compared to the larger issue that he should definitely not replace his current method by storing the PR_ENTRYID instead - that's just asking for trouble.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Patrick Microsoft Online Community Support
    Friday, October 29, 2010 3:13 PM