The GetProps method gets the list of property values for a PIM item at a given index into its collection, without the need to instantiate an object for the item. It uses the index into the collection rather than an OID or another POOM object.
IPOlItems2::GetProps is useful for getting properties when iterating through a collection because you do not have to instantiate each object just to read its properties. Additionally, you do not have to cache the list of OID's.
HRESULT GetProps(( int iIndex, const CEPROPID * rgPropID, ULONG ulFlags, WORD cProps, CEPROPVAL ** prgVals, ULONG * pcbBuffer, HANDLE hHeap )
[in] The index into the array of property ID's.
[in] An array of property ID's.
[in] Flag specifying memory allocation for prgVals. To allocate memory for prgVals, set to CEDB_ALLOWREALLOC. Set to zero if already allocated.
[in] The number of property values contained in rgPropID.
[out] Reference to an array used to return the list of property values if you allocate memory (i.e., set ulFlags to CEDB_ALLOWREALLOC), . If you do not allocate memory, then prgVals is NULL, and GetProps allocates the memory for you. For information about CEPROPVAL, see CEPROPVAL.
[in/out] Reference to the count of bytes passed in prgVals if you allocate memory. If you do not allocate memory, then pcbBuffer is the size of the buffer that GetProps allocated instead.
[in] Handle to the heap memory to allocate prgVals (if you allocate memory). If you do not allocate memory, then hHeap must be NULL.
This method returns the standard values HRESULT_FROM_WIN32(GetLastError()), E_INVALIDARG, and E_FAIL, as well as the following:
The method completed successfully.
The GetProps method is based on IMAPIProp::GetProps.
If you do not allocate memory with prgVals, you must free *prgVals with HeapFree.
|Windows Mobile||Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later|