libmapi/IMAPITable.c File Reference

Operations on tables. More...

#include <libmapi/libmapi.h>

Functions

_PUBLIC_ enum MAPISTATUS Abort (mapi_object_t *obj_table, uint8_t *TableStatus)
_PUBLIC_ enum MAPISTATUS CollapseRow (mapi_object_t *obj_table, uint64_t categoryId, uint32_t *rowCount)
_PUBLIC_ enum MAPISTATUS CreateBookmark (mapi_object_t *obj_table, uint32_t *lpbkPosition)
_PUBLIC_ enum MAPISTATUS ExpandRow (mapi_object_t *obj_table, uint64_t categoryId, uint16_t maxRows, struct SRowSet *rowData, uint32_t *expandedRowCount)
_PUBLIC_ enum MAPISTATUS FindRow (mapi_object_t *obj_table, struct mapi_SRestriction *res, uint32_t bkOrigin, uint8_t ulFlags, struct SRowSet *SRowSet)
_PUBLIC_ enum MAPISTATUS FreeBookmark (mapi_object_t *obj_table, uint32_t bkPosition)
uint32_t get_mapi_SRestriction_size (struct mapi_SRestriction *res)
_PUBLIC_ enum MAPISTATUS GetCollapseState (mapi_object_t *obj_table, uint64_t rowId, uint32_t rowInstanceNumber, struct SBinary_short *CollapseState)
_PUBLIC_ enum MAPISTATUS GetStatus (mapi_object_t *obj_table, uint8_t *TableStatus)
_PUBLIC_ enum MAPISTATUS QueryColumns (mapi_object_t *obj_table, struct SPropTagArray *cols)
_PUBLIC_ enum MAPISTATUS QueryPosition (mapi_object_t *obj_table, uint32_t *Numerator, uint32_t *Denominator)
_PUBLIC_ enum MAPISTATUS QueryRows (mapi_object_t *obj_table, uint16_t row_count, enum QueryRowsFlags flags, struct SRowSet *rowSet)
_PUBLIC_ enum MAPISTATUS Reset (mapi_object_t *obj_table)
_PUBLIC_ enum MAPISTATUS Restrict (mapi_object_t *obj_table, struct mapi_SRestriction *res, uint8_t *TableStatus)
_PUBLIC_ enum MAPISTATUS SeekRow (mapi_object_t *obj_table, enum BOOKMARK origin, int32_t offset, uint32_t *row)
_PUBLIC_ enum MAPISTATUS SeekRowApprox (mapi_object_t *obj_table, uint32_t ulNumerator, uint32_t ulDenominator)
_PUBLIC_ enum MAPISTATUS SeekRowBookmark (mapi_object_t *obj_table, uint32_t lpbkPosition, uint32_t RowCount, uint32_t *row)
_PUBLIC_ enum MAPISTATUS SetCollapseState (mapi_object_t *obj_table, struct SBinary_short *CollapseState, uint32_t *lpbkPosition)
_PUBLIC_ enum MAPISTATUS SetColumns (mapi_object_t *obj_table, struct SPropTagArray *properties)
_PUBLIC_ enum MAPISTATUS SortTable (mapi_object_t *obj_table, struct SSortOrderSet *lpSortCriteria)

Detailed Description

Operations on tables.


Function Documentation

_PUBLIC_ enum MAPISTATUS Abort ( mapi_object_t *  obj_table,
uint8_t *  TableStatus 
)

Aborts an asynchronous table operation in progress

Parameters:
obj_table the table object where we want to abort an asynchronous operation
TableStatus pointer on the table status returned by the operation
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table or TableStatus are null
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References emsmdb_transaction(), mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS CollapseRow ( mapi_object_t *  obj_table,
uint64_t  categoryId,
uint32_t *  rowCount 
)

Collapse an expanded row in a table

After a contents table has been sorted and categorized using SortTable, rows can be expanded and collapsed (using ExpandRow and CollapseRow repectively).

Parameters:
obj_table the table we are collapsing the category in.
categoryId the row identification for the heading row for the category being collapsed.
rowCount (result) the number of rows that were removed from the table when the row was collapsed.

You obtain the categoryId argument from the PR_INST_ID property of the heading row for the category that is being collapsed.

If you pass rowCount as null, the number of rows will not be returned.

Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table is NULL
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See also:
ExpandRow

References emsmdb_transaction(), mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS CreateBookmark ( mapi_object_t *  obj_table,
uint32_t *  lpbkPosition 
)

Marks the table current position

Parameters:
obj_table the table we are creating a bookmark in
lpbkPosition pointer to the bookmark value. This bookmark can be passed in a call to the SeekRowBookmark method
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table is NULL
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See also:
SeekRowBookmark, FreeBookmark

References emsmdb_transaction(), mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS ExpandRow ( mapi_object_t *  obj_table,
uint64_t  categoryId,
uint16_t  maxRows,
struct SRowSet *  rowData,
uint32_t *  expandedRowCount 
)

Expand a collapsed row in a table

After a contents table has been sorted and categorized using SortTable, rows can be expanded and collapsed (using ExpandRow and CollapseRow repectively).

Parameters:
obj_table the table we are collapsing the category in.
categoryId the row identification for the heading row for the category being expanded.
maxRows the maximum number of rows to retrieve (can be zero)
rowData (result) the data rows under this category heading
expandedRowCount (result) the number of rows that were added to the table when the row was expanded

You obtain the categoryId argument from the PR_INST_ID property of the heading row for the category that is being collapsed.

The maxRows argument specifies the upper limit on how many rows to return (as rowData) when the category is expanded. The expandedRowCount argument returns the number of rows that were added to the table. As an example, consider a collapsed category with 8 entries. If you set maxRows to 3, then rowData will contain the data for the first three rows, and expandedRowCount will be set to 8. If you now use QueryRows(), you can read the 5 additional rows. If you'd specified maxRows as 8 (or more), rowData would have contained all 8 rows and expandedRowCount still would have been 8.

Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table, rowData or rowCount are NULL
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See also:
CollapseRow

References emsmdb_get_SRowSet(), emsmdb_transaction(), mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS FindRow ( mapi_object_t *  obj_table,
struct mapi_SRestriction *  res,
uint32_t  bkOrigin,
uint8_t  ulFlags,
struct SRowSet *  SRowSet 
)

Find the next row in a table that matches specific search criteria

Parameters:
obj_table the table we are searching in
res pointer on search criterias
bkOrigin bookmark identifying the row where FindRow should begin
ulFlags controls the direction of the search
SRowSet the resulting row

bkOrigin can either take the value of a bookmark created with CreateBookmark or any of the default values:

  • BOOKMARK_BEGINNING
  • BOOKMARK_CURRENT
  • BOOKMARK_END

ulFlags can be set either to DIR_FORWARD (0x0) or DIR_BACKWARD (0x1).

Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table is NULL
  • MAPI_E_INVALID_BOOKMARK: the bookmark specified is invalid or beyond the last row requested.
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See also:
CreateBookmark

References emsmdb_get_SRowSet(), emsmdb_transaction(), get_mapi_SRestriction_size(), mapi_object_bookmark_find(), mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

Referenced by GetUserFreeBusyData().

_PUBLIC_ enum MAPISTATUS FreeBookmark ( mapi_object_t *  obj_table,
uint32_t  bkPosition 
)

Release the resources associated with a bookmark

Parameters:
obj_table the table the bookmark is associated to
bkPosition the bookmark to be freed
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table is NULL
  • MAPI_E_INVALID_BOOKMARK: The bookmark specified is invalid or beyond the last row requested
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See also:
CreateBookmark

References emsmdb_transaction(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), and MAPIFreeBuffer().

uint32_t get_mapi_SRestriction_size ( struct mapi_SRestriction *  res  ) 

Get the size associated to a mapi SRestriction

Parameters:
res pointer on the mapi_SRestriction
Returns:
mapi_SRestriction size

Referenced by FindRow(), Restrict(), and SetSearchCriteria().

_PUBLIC_ enum MAPISTATUS GetCollapseState ( mapi_object_t *  obj_table,
uint64_t  rowId,
uint32_t  rowInstanceNumber,
struct SBinary_short *  CollapseState 
)

Get the Collapse State of a Table

After a contents table has been sorted and categorized using SortTable, rows can be expanded and collapsed (using ExpandRow() and CollapseRow() repectively). You can save the state of the table using this function, and restore it using SetCollapseState.

Parameters:
obj_table the table we are retrieving the state from
rowId the row number for the cursor
rowInstanceNumber the instance number for the cursor
CollapseState (result) the returned table Collapse State

You obtain the row number and row instance number arguments from the PR_INST_ID and PR_INST_NUM properties of the row you want to use as the cursor.

Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table or CollapseState are null
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See also:
SetCollapseState

References emsmdb_transaction(), mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS GetStatus ( mapi_object_t *  obj_table,
uint8_t *  TableStatus 
)

Get the status of a table

Parameters:
obj_table the table we are retrieving the status from
TableStatus the table status result

TableStatus can either hold:

  • TBLSTAT_COMPLETE (0x0)
  • TBLSTAT_SORTING (0x9)
  • TBLSTAT_SORT_ERROR (0xA)
  • TBLSTAT_SETTING_COLS (0xB)
  • TBLSTAT_SETCOL_ERROR (0xD)
  • TBLSTAT_RESTRICTING (0xE)
  • TBLSTAT_RESTRICT_ERROR (0xF)
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table is NULL
  • MAPI_E_INVALID_BOOKMARK: the bookmark specified is invalid or beyond the last row requested.
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See also:
SetColumns, Restrict, FindRow, GetHierarchyTable, GetContentsTable

References emsmdb_transaction(), mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS QueryColumns ( mapi_object_t *  obj_table,
struct SPropTagArray *  cols 
)

Retrieves the set of columns defined in the current table view

Parameters:
obj_table the table we are retrieving columns from
cols pointer to an array of property tags
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table is NULL
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See also:
SetColumns, QueryRows

References emsmdb_transaction(), mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS QueryPosition ( mapi_object_t *  obj_table,
uint32_t *  Numerator,
uint32_t *  Denominator 
)

Returns the approximate cursor position

Parameters:
obj_table pointer to the table's object
Numerator pointer to the numerator of the fraction identifying the table position
Denominator pointer to the denominator of the fraction identifying the table position
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table is NULL
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See also:
QueryRows
Examples:
fetchappointment.c, and fetchmail.c.

References emsmdb_transaction(), mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

Referenced by ModifyUserPermission(), and RemoveUserPermission().

_PUBLIC_ enum MAPISTATUS QueryRows ( mapi_object_t *  obj_table,
uint16_t  row_count,
enum QueryRowsFlags  flags,
struct SRowSet *  rowSet 
)

Returns a RowSet with the properties returned by the server

Parameters:
obj_table the table we are requesting properties from
row_count the maximum number of rows to retrieve
flags flags to use for the query
rowSet the results

flags possible values:

  • TBL_ADVANCE: index automatically increased from last rowcount
  • TBL_NOADVANCE: should be used for a single QueryRows call
  • TBL_ENABLEPACKEDBUFFERS: (not yet implemented)
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table is NULL
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See also:
SetColumns, QueryPosition, QueryColumns, SeekRow
Examples:
fetchappointment.c, and fetchmail.c.

References emsmdb_get_SRowSet(), emsmdb_transaction(), mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

Referenced by ModifyUserPermission(), and RemoveUserPermission().

_PUBLIC_ enum MAPISTATUS Reset ( mapi_object_t *  obj_table  ) 

Removes all filters that are currently on a table

Parameters:
obj_table the table object to reset
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table is NULL
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See also:
Restrict

References emsmdb_transaction(), mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS Restrict ( mapi_object_t *  obj_table,
struct mapi_SRestriction *  res,
uint8_t *  TableStatus 
)

Applies a filter to a table, reducing the row set to only those rows matching the specified criteria.

Parameters:
obj_table the object we are filtering
res the filters we want to apply
TableStatus the table status result

TableStatus can either hold:

  • TBLSTAT_COMPLETE (0x0)
  • TBLSTAT_SORTING (0x9)
  • TBLSTAT_SORT_ERROR (0xA)
  • TBLSTAT_SETTING_COLS (0xB)
  • TBLSTAT_SETCOL_ERROR (0xD)
  • TBLSTAT_RESTRICTING (0xE)
  • TBLSTAT_RESTRICT_ERROR (0xF)

Unlike MAPI, you don't pass a null restriction argument to remove the current restrictions. Use Reset() instead.

TableStatus should be set to NULL if you don't want to retrieve the status of the table.

Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table is NULL
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See also:
QueryRows, Reset

References emsmdb_transaction(), get_mapi_SRestriction_size(), mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS SeekRow ( mapi_object_t *  obj_table,
enum BOOKMARK  origin,
int32_t  offset,
uint32_t *  row 
)

Move the table cursor at a specific location

Parameters:
obj_table the table we are moving cursor on
origin the table position where we start to seek
offset a particular offset in the table
row the position of the seeked row is returned in rows

origin possible values:

  • BOOKMARK_BEGINNING: Beginning of the table
  • BOOKMARK_CURRENT: Current position in the table
  • BOKMARK_END: End of the table
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table is NULL
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See also:
SetColumns, QueryRows

References emsmdb_transaction(), mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS SeekRowApprox ( mapi_object_t *  obj_table,
uint32_t  ulNumerator,
uint32_t  ulDenominator 
)

Moves the cursor to an approximate fractional position in the table

Parameters:
obj_table the table we are moving cursor on
ulNumerator numerator of the fraction representing the table position.
ulDenominator denominator of the fraction representing the table position
  • If ulDenominator is NULL, then SeekRowApprox returns MAPI_E_INVALID_PARAMETER.
  • If ulNumerator is NULL, then SeekRowApprox moves the cursor to the beginning of the table. In such situation, SeekRowApprox call is similar to SeekRow with BOOKMARK_BEGINNING
  • If ulNumerator and ulDenominator have the same value, then SeekRowApprox moves the cursor to the end of the table. In such situation, SeekRowApprox call is similar to SeekRow with BOOKMARK_END
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table is NULL
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See also:
SeekRow, SeekRowBookmark

References emsmdb_transaction(), mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS SeekRowBookmark ( mapi_object_t *  obj_table,
uint32_t  lpbkPosition,
uint32_t  RowCount,
uint32_t *  row 
)

Move the table cursor at a specific location given a bookmark

Parameters:
obj_table the table we are moving cursor on
lpbkPosition the bookmarked position
RowCount a relative number of rows to the bookmark
row the position of the seeked row is returned in rows
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table is NULL
  • MAPI_E_INVALID_BOOKMARK: The bookmark specified is invalid or beyond the last row requested
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See also:
CreateBookmark, FreeBookmark

References emsmdb_transaction(), mapi_object_bookmark_find(), mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS SetCollapseState ( mapi_object_t *  obj_table,
struct SBinary_short *  CollapseState,
uint32_t *  lpbkPosition 
)

Set the Collapse State of a Table

After a contents table has been sorted and categorized using SortTable, rows can be expanded and collapsed (using ExpandRow() and CollapseRow() repectively). You can save the state of the table using GetCollapseState, and restore it using this function.

Parameters:
obj_table the table we are restoring the state for
CollapseState the Collapse State to restore
lpbkPosition pointer to the bookmark value. This bookmark can be passed in a call to the SeekRowBookmark method

You obtain the row number and row instance number arguments from the PR_INST_ID and PR_INST_NUM properties of the row you want to use as the cursor.

Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table or CollapseState are null
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See also:
GetCollapseState

References emsmdb_transaction(), mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS SetColumns ( mapi_object_t *  obj_table,
struct SPropTagArray *  properties 
)

Defines the particular properties and order of properties to appear as columns in the table.

Parameters:
obj_table the table the function is setting columns for
properties the properties intended to be set
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table is NULL
  • MAPI_W_ERROR_RETURNED: Problem encountered while trying to set one or more properties
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See also:
QueryRows, QueryColumns, SeekRow, GetLastError
Examples:
fetchappointment.c, and fetchmail.c.

References emsmdb_transaction(), mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

Referenced by GetUserFreeBusyData(), ModifyUserPermission(), and RemoveUserPermission().

_PUBLIC_ enum MAPISTATUS SortTable ( mapi_object_t *  obj_table,
struct SSortOrderSet *  lpSortCriteria 
)

Order the rows of the table based on a criteria

Parameters:
obj_table the table we are ordering rows on
lpSortCriteria pointer on sort criterias to apply
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_table or lpSortCriteria is NULL
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References emsmdb_transaction(), mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

Referenced by GetUserFreeBusyData().


Creative Commons License
Creative Commons Attribution icon Creative Commons Share Alike icon
This content is licensed under the Creative Commons
Attribution ShareAlike License v. 3.0:
http://creativecommons.org/licenses/by-sa/3.0/