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 the first unread message

Tom

unread,
17 Sept 2004, 18:35:0317/09/2004
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,
17 Sept 2004, 23:46:0717/09/2004
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,
20 Sept 2004, 12:45:0220/09/2004
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,
20 Sept 2004, 13:10:0720/09/2004
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,
20 Sept 2004, 13:33:0320/09/2004
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,
20 Sept 2004, 15:12:1820/09/2004
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,
20 Sept 2004, 15:39:0420/09/2004
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,
20 Sept 2004, 16:33:1620/09/2004
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,
20 Sept 2004, 18:15:0320/09/2004
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,
20 Sept 2004, 18:35:0020/09/2004
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,
21 Sept 2004, 15:07:0321/09/2004
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