The IMAPIProp::GetProps method gets the property values of one or more properties of an object.
The property values are returned in the same order as they were requested. That is, the order of properties in the property tag array pointed to by lpPropTagArray matches the order in the array of property value structures pointed to by lppPropArray.
The property types specified in the aulPropTag members of the property tag array indicate the type of value that should be returned in the Value member of each property value structure. However, if the caller does not know the type of a property, the type in the aulPropTag member can be set instead to PT_UNSPECIFIED. In retrieving the value, GetProps sets the correct type in the ulPropTag member of the property value structure for the property.
If property types are specified in the SPropTagArray in lpPropTagArray, then the property values in the SPropValue returned in lppPropArray have types that exactly match the requested types, unless an error value is returned instead.
String properties can have one of two property types: PT_UNICODE to represent the Unicode format and PT_STRING8 to represent the ANSI format. If the MAPI_UNICODE flag is set in the ulFlags parameter, whenever GetProps cannot determine the appropriate format for a string property, it returns its value in the Unicode format. GetProps cannot determine an exact string property type:
-
If the lpPropTagArray parameter is set to NULL to request all properties.
-
When the aulPropTag member includes the value PT_UNSPECIFIED as its property type in the property tag array.
If the lpPropTagArray parameter is set to NULL to retrieve all of the properties of the object and no properties exist, GetProps:
-
Returns S_OK.
-
Sets the count value in the cValues member of the property value structure to zero.
-
Sets the contents of lpcValues to zero.
-
Sets lppPropArray to NULL.
-
Must not return multivalued properties with cValues set to zero.