PR_SEARCH_KEY 

The PR_SEARCH_KEY property contains a binary-comparable key that identifies correlated objects for a search.

Quick Info

Header file:

MAPITAGS.H

Must be exposed by:

Address book container, distribution list, messaging user, and message objects

Identifier:

0x300B

Property type:

PT_BINARY

Property tag:

0x300B0102

Corresponding X.400 attribute:

IM_THIS_IPM

 

Remarks

The PR_SEARCH_KEY property provides a trace for related objects, such as message copies, and facilitates finding unwanted occurrences, such as duplicate recipients.

PR_SEARCH_KEY is one of the base address properties for all messaging users. For more information on the base address properties, see Base Address PropertiesN3YFFO.

MAPI uses specific rules for constructing search keys for message recipients. The search key is formed by concatenating the address type (in uppercase characters), the colon character  : , the e-mail address in canonical form, and the terminating null character. Canonical form here means that case-sensitive addresses appear in the correct case, and addresses that are not case-sensitive are converted to uppercase. This is important in preserving correlations among messages.

For message objects, PR_SEARCH_KEY is available through the IMAPIProp::GetPropsK06IXU method immediately following message creation. For other objects, it is available following the first call to the IMAPIProp::SaveChanges21IFXQ method. Because PR_SEARCH_KEY is changeable, it is unreliable to obtain it through GetProps until a SaveChanges call has committed any values set or changed by the IMAPIProp::SetPropsXCFLAC method.

For profiles, MAPI also furnishes a hard-coded profile section named MUID_PROFILE_INSTANCE, with PR_SEARCH_KEY as its single property. This key is guaranteed to be unique among all profiles ever created, and can be more reliable than the PR_PROFILE_NAMEAFGGT8 property, which can be, for example, deleted and recreated with the same name.

The following table summarizes important differences among the PR_ENTRYID2JH9H8T, PR_RECORD_KEYQV4J.N, and PR_SEARCH_KEY properties.

Characteristic

PR_ENTRYID

PR_RECORD_KEY

PR_SEARCH_KEY

Required on
attachment objects

No

Yes

No

Required on
folder objects

Yes

Yes

No

Required on
message store objects

Yes

Yes

No

Required on
status objects

Yes

No

No

Creatable by client

No

No

Yes

Available before
SaveChanges

Maybe

Maybe

Messages   Yes
Others
  Maybe

Changed in a
copy operation

Yes

Yes

NO

Changeable by client
after a copy

No

No

Yes

Unique within ...

Entire world

Provider instance

Entire world

Binary comparable
(as with memcmp)

No -- use
IMAPISupport::
CompareEntryIDs

Yes

Yes

 

See Also

PR_RESPONSIBILITY, PR_STORE_RECORD_KEY