IMAPISession::GetMsgStoresTable

The IMAPISession::GetMsgStoresTable method provides access to the message store table, a table with information about all of the message stores in the session profile.

Quick Info

See IMAPISession : IUnknown2MVW67N.

 

HRESULT GetMsgStoresTable(

    ULONG ulFlags,

 

    LPMAPITABLE FAR * lppTable

 

   )

 

 

Parameters

ulFlags

[in] Bitmask of flags that determine the format for columns that are character strings. The following flag can be set:

MAPI_UNICODE

The string columns are in Unicode format. If the MAPI_UNICODE flag is not set, the string columns are in ANSI format.

lppTable

[out] Pointer to a pointer to the message store table.

 

Return Values

S_OK

The table was successfully returned.

MAPI_E_BAD_CHARWIDTH

The MAPI_UNICODE flag was set and MAPI does not support Unicode at present.

 

Remarks

The IMAPISession::GetMsgStoresTable method retrieves a pointer to the message store table,  a table maintained by MAPI that contains information about each open message store in the profile.

For a complete list of required and optional columns in the message store table, see Message Store TableCQ4NO0.

Notes to Callers

Because MAPI updates the message store table during the session whenever changes occur, call the Advise method of the message store table to register to be notified of these changes. Possible changes include the addition of new message stores, removal of existing stores, and changes to the default store.

Setting the MAPI_UNICODE flag in the ulFlags parameter affects the format of the columns returned from the following IMAPITable methods:

    IMAPITable::QueryColumns2CQT2TO

    IMAPITable::QueryRowsKPHHB

 

This flag also controls the property types in the sort order returned by the IMAPITable::QuerySortOrderEWDPDZ method.

 

See Also

IMAPISession::OpenMsgStore, IMAPITable::QueryColumns, IMAPITable::QueryRows, IMAPITable::QuerySortOrder, IMAPITable::SetColumns, IMAPITable::SortTable