IMAPIContainer::GetContentsTable

The IMAPIContainer::GetContentsTable method returns a pointer to the container s contents table.

Quick Info

See IMAPIContainer : IMAPIProp6IZN.5.

 

HRESULT GetContentsTable(

    ULONG ulFlags,

 

    LPMAPITABLE FAR * lppTable

 

   )

 

 

Parameters

ulFlags

[in] Bitmask of flags that controls how the contents table is returned. The following flags can be set:

MAPI_ASSOCIATED

The container s associated contents table should be returned rather than the standard contents table. This flag is used only with folders. The messages that are included in the associated contents table were created with the MAPI_ASSOCIATED flag set in the call to IMAPIFolder::CreateMessage1YLHY8P. Clients typically use the associated contents table to retrieve forms and views.

MAPI_DEFERRED_ERRORS

GetContentsTable can return successfully, possibly before the table is made accessible to the caller. If the table is not accessible, making a subsequent table call can result in an error.

MAPI_UNICODE

Requests that the columns containing string data be returned in the Unicode format. If the MAPI_UNICODE flag is not set, the strings should be returned in the ANSI format.

lppTable

[out] Pointer to a pointer to the contents table.

 

Return Values

S_OK

The contents table was successfully retrieved.

MAPI_E_BAD_CHARWIDTH

Either the MAPI_UNICODE flag was set and the implementation does not support Unicode, or MAPI_UNICODE was not set and the implementation only supports Unicode.

MAPI_E_NO_SUPPORT

The container has no contents and cannot provide a contents table.

 

Remarks

The IMAPIContainer::GetContentsTable method returns a pointer to the contents table of a container. A contents table contains summary information about objects within the container.

Contents tables have lengthy column sets. For a complete list of the required and optional columns in contents tables, see Contents Tables122RMP7.

It is possible for some containers to have no contents. These containers return MAPI_E_NO_SUPPORT from their implementations of GetContentsTable.

Notes to Implementers

If you support a contents table for your container, you must also:

    Support calls to the container s IMAPIProp::OpenPropertyLFSSYS method to open the PR_CONTAINER_CONTENTSKJXKKY property.

    Return PR_CONTAINER_CONTENTS in response to a call to the container s IMAPIProp::GetPropsK06IXU and IMAPIProp::GetPropListB2KAAM methods.

 

Notes to Callers

String and binary contents table columns can be truncated. Typically, providers return 255 characters. Because you cannot know ahead of time whether or not a table includes truncated columns, assume that a column is truncated if the length of the column is either 255 or 510 bytes. You can always retrieve the full value of a truncated column if necessary from the object directly by using its entry identifier to open it and then calling the IMAPIProp::GetProps method.

Depending on the provider s implementation, restrictions and sorting operations can apply to an entire string or to the truncated version of that string.

See Also

IMAPIProp::GetPropList, IMAPIProp::GetProps, IMAPIProp::OpenProperty, IMAPITable : IUnknown, PR_CONTAINER_CONTENTS