IMAPITable::GetCollapseState

The IMAPITable::GetCollapseState method returns the data necessary to rebuild the current collapsed or expanded state of a categorized table.

Quick Info

See IMAPITable : IUnknown.

HRESULT GetCollapseState(
  ULONG ulFlags,                  
  ULONG cbInstanceKey,            
  LPBYTE lpbInstanceKey,          
  ULONG FAR * lpcbCollapseState,   
  LPBYTE FAR * lppbCollapseState  
);
 

Parameters

ulFlags
Reserved; must be zero.
cbInstanceKey
[in] Count of bytes in the instance key pointed to by the lpbInstanceKey parameter.
lpbInstanceKey
[in] Pointer to the PR_INSTANCE_KEY property of the row at which the current collapsed or expanded state should be rebuilt. The lpbInstanceKey parameter cannot be NULL.
lpcbCollapseState
[out] Pointer to the count of structures pointed to by the lppbCollapseState parameter.
lppbCollapseState
[out] Pointer to a pointer to structures containing data describing the current table view.

Return Values

S_OK
The state for the categorized table was successfully saved.
MAPI_E_BUSY
Another operation is in progress that prevents the operation from starting. Either the operation in progress should be allowed to complete or it should be stopped.
MAPI_E_NO_SUPPORT
The table does not support categorization and expanded and collapsed views.

Remarks

The IMAPITable::GetCollapseState method works with the IMAPITable::SetCollapseState method to change the user's view of a categorized table. GetCollapseState saves the data necessary for SetCollapseState to use to rebuild the appropriate views of the categories of a categorized table. Service providers determine the data to be saved. However, most service providers implementing GetCollapseState save:

For more information about categorized tables, see Sorting and Categorization.

Notes to Implementers

Store the entire current state of all nodes of a table in the lppbCollapseState parameter.

Notes to Callers

Always call GetCollapseState before calling SetCollapseState.

See Also

IMAPITable::SetCollapseState