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:
The sort keys (standard columns and category columns).
Information about the row that the instance key represents.
Information to restore the collapsed and expanded categories of the table.