Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

what's PR_SEARCH_KEY for?

715 views
Skip to first unread message

Tom

unread,
Sep 17, 2004, 6:35:03 PM9/17/04
to
Hi,

What's the real purpose of PR_SEARCH_KEY property in a message? Can it
uniquely identified a message like the PR_ENTRYID?

When will it ever be modified?


Thanks

Dmitry Streblechenko (MVP)

unread,
Sep 17, 2004, 11:46:07 PM9/17/04
to
In messages, PR_SEARCH_KEY is unique and is created when the message is
created. Unlike PR_ENTRYID or PR_SOURCE_KEY, it is changeable by your code
and it does not change when a message is copied or moved, so it is possible
that two messages will have the same value of PR_SEARCH_KEY.

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


"Tom" <T...@discussions.microsoft.com> wrote in message
news:ED6AFD51-89BC-4ADC...@microsoft.com...

Tom

unread,
Sep 20, 2004, 12:45:02 PM9/20/04
to
Thanks Dmitry,

I notice that when I make a copy of the message, both messages will have the
same PR_SEARCH_KEY. I found some information over the internet that some
reocurring appointments would have the same PR_SEARCH_KEY as well, do you
know any other cases? Any commercial software would modify this PR_SEARCH_KEY?

Also will it be possible that a message (regardless of it's message class)
exists without a PR_SEARCH_KEY?


Thanks
Tom

Dmitry Streblechenko (MVP)

unread,
Sep 20, 2004, 1:10:07 PM9/20/04
to
What exactly are you trying to do?

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


"Tom" <T...@discussions.microsoft.com> wrote in message

news:246FEA94-4219-4693...@microsoft.com...

Tom

unread,
Sep 20, 2004, 1:33:03 PM9/20/04
to
I am trying to find an alternative way to uniquely identify a message in the
message store but not using PR_ENTRYID.

Dmitry Streblechenko (MVP)

unread,
Sep 20, 2004, 3:12:18 PM9/20/04
to
What's wrong with PR_ENTRYID? Besides being unique, you can use it to open
the message using IMsgStore::OpenEntry without having to search first.
In case of Exchange, you can also use PR_SOURCE_KEY.

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


"Tom" <T...@discussions.microsoft.com> wrote in message

news:AF267D63-502A-4782...@microsoft.com...

Tom

unread,
Sep 20, 2004, 3:39:04 PM9/20/04
to
The PR_ENTRYID is 70 bytes and PR_SEARCH_KEY is only 16 bytes, I need to
transmit the list of unique IDs over the network to the server side component
and trying to reduce the amount of data. So the key would need to be small in
byte counts, fixed size and can still uniquely identy a message.

Dmitry Streblechenko (MVP)

unread,
Sep 20, 2004, 4:33:16 PM9/20/04
to
Then why not use your own (named) property set to a unique value?

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


"Tom" <T...@discussions.microsoft.com> wrote in message

news:E4090E57-0E52-4A99...@microsoft.com...

Tom

unread,
Sep 20, 2004, 6:15:03 PM9/20/04
to
Thanks Dmitry,

That would change the message on the exchange server as well, we try to be
transparent as much as possible. I probably would just use PR_SEARCH_KEY and
special handle the case where 2 messages map to the same PR_SEARCH_KEY.

Dmitry Streblechenko (MVP)

unread,
Sep 20, 2004, 6:35:00 PM9/20/04
to
Then since you are using Exchange, try PR_SOURCE_KEY

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


"Tom" <T...@discussions.microsoft.com> wrote in message

news:4BDD3DB8-C7C5-4CE1...@microsoft.com...

Tom

unread,
Sep 21, 2004, 3:07:03 PM9/21/04
to
I took a look at the PR_SOURCE_KEY and it seems to be a good candidate for
me. But when Outlook synchronize the message and store in the offline store,
this property doesn't seem to exist in the OST. But it exists at the exchange
server. I guess this key is special design for ICS interface. For this
reason, I am not able to use this property,


Thanks

0 new messages