IPOlItems2::GetProps

Send Feedback

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.

Syntax

HRESULT GetProps((
  int iIndex,
  const CEPROPID * rgPropID,
  ULONG ulFlags,
  WORD cProps,
  CEPROPVAL ** prgVals,
  ULONG * pcbBuffer,
  HANDLE hHeap
)

Parameters

  • iIndex
    [in] The index into the array of property ID's.
  • rgPropID
    [in] An array of property ID's.
  • ulFlags
    [in] Flag specifying memory allocation for prgVals. To allocate memory for prgVals, set to CEDB_ALLOWREALLOC. Set to zero if already allocated.
  • cProps
    [in] The number of property values contained in rgPropID.
  • prgVals
    [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.
  • pcbBuffer
    [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.
  • hHeap
    [in] Handle to the heap memory to allocate prgVals (if you allocate memory). If you do not allocate memory, then hHeap must be NULL.

Return Values

This method returns the standard values HRESULT_FROM_WIN32(GetLastError()), E_INVALIDARG, and E_FAIL, as well as the following:

  • S_OK
    The method completed successfully.

Remarks

The GetProps method is based on IMAPIProp::GetProps.

If you do not allocate memory with prgVals, you must free *prgVals with HeapFree.

Requirements

Pocket PC: Windows Mobile Version 5.0 and later
Smartphone: Windows Mobile Version 5.0 and later
OS Versions: Windows CE 5.01 and later
Header: pimstore.h
Library: pimstore.lib

See Also

IPOlItems2 | IItem::GetProps | IMAPIProp::GetProps | Pocket Outlook Object Model API Interfaces | Pocket Outlook Object Model API Enumerations

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.