The IMAPIProp::GetProps method obtains 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 aulPropTag member of the property value structure for the property.
If property types are specified in the SPropTagArray in lpPropTagArray, 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 in the following situations:
If the lpPropTagArray parameter is set to NULL to retrieve all of the properties of the object and no properties exist, GetProps does the following:
-
Returns S_OK.
-
Sets the count value in the cValues member of the property value structure to 0.
-
Sets the contents of lpcValues to 0.
-
Sets lppPropArray to NULL.
GetProps must not return multiple-value properties with cValues set to 0.