Share via


2.4.3.2 Mapping between EntryID and NID

Objects in the message store are accessed externally using EntryIDs ([MS-OXCDATA] section 2.2), where within the PST, objects are accessed using their respective NIDs. The following explains the layout of the ENTRYID structure, which is used to map between an NID and its EntryID:

Unicode / ANSI:


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

rgbFlags

uid (16 bytes)

...

...

nid

rgbFlags (4 bytes): Flags; each of these bytes MUST be initialized to zero.

uid (16 bytes): The provider UID of this PST, which is the value of the PidTagRecordKey property in the message store. If this property does not exist, the PST client MAY generate a new unique ID, or reject the PST as invalid.

nid (4 bytes): This is the corresponding NID of the underlying node that represents the object.

The corresponding NID of an EntryID can be directly extracted from the EntryID structure. In addition, the NID_TYPE of the NID can be further verified to ensure that the type of node (for example, NID_TYPE_NORMAL_MESSAGE) actually matches the type of object being referenced. Also, as a further verification mechanism, implementations can compare the uid field against the PidTagRecordKey property in the message store to ensure the EntryID actually refers to an item in the current PST. This is particularly useful if the implementation supports opening more than one PST at a time.

Conversely, the procedure for converting an NID to an EntryID simply involves constructing the ENTRYID structure from the NID and the PST Provider UID (PidTagRecordKey).