Article ID: 195656 - Last Review: March 4, 2004 - Revision: 2.1 BUG: Accessing Custom Properties with CDO (1.x)This article was previously published under Q195656 SYMPTOMS
When you access custom properties with Collaboration Data Objects (1.x),
you may receive an error of MAPI_E_NOT_FOUND when you use the third syntax
listed in the help for the Fields.Item help:
CAUSE
This problem is caused by the way in which CDO (1.x) converts the PropSetID you input from a string to a Global Unique Identifier (GUID). CDO (1.x) uses the FBinFromHex() function to convert the input string to a binary array and then casts it to a GUID. The GUID structure looks like {ULONG, ULONG, USHORT, char[8]}. When the byte array is cast to this GUID structure, the ULONG and USHORT byte values are in reverse order due to the Little-Endian byte order on x86 architecture machines. The char[] portion is fine because a byte[] array has the same structure as a char[].
RESOLUTION
When inputing the PropSetID, exchange the following positions:
For example, if your GUID is as follows: 0123456789ABCDEFxxxxxxxxxxxxxxxx P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12 P13 P14 P15 P16 -- -- -- -- --- --- --- --- --- ---- ---- ---- ---- ---- ---- --- 0 1 2 3 4 5 6 7 8 9 A B C D E F 67452301AB89EFCDxxxxxxxxxxxxxxxx P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12 P13 P14 P15 P16 -- -- -- -- -- -- -- -- -- --- --- --- --- --- --- --- 6 7 4 5 2 3 0 1 A B 8 9 E F C D STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
MORE INFORMATION
Custom properties are properties that Messaging Application Programming
Interface (MAPI) allows you to create by giving a GUID and either a name or
number. This allows you to create your own virtual namespace of property
identifiers that are unique from those that someone else might create.
REFERENCES
Platform Software Development Kit; search on: "Using Named Properties"
APPLIES TO
| Article Translations
|


Back to the top
