Share via


IMAPITable::SeekRow

4/8/2010

The SeekRow method moves the cursor to a specific position in the table.

Note

This method is not supported on hierarchy tables or message stores tables.

Syntax

HRESULT SeekRow (
  BOOKMARK bkOrigin,
  LONG lRowCount,
  LONG FAR * lplRowsSought
);

Parameters

  • bkOrigin
    [in] Bookmark identifying the starting position for the seek operation; must be BOOKMARK_BEGINNING, indicating that the seek operation starts from the beginning of the table.
  • lRowCount
    [in] Signed count of the number of rows to move, starting from the bookmark identified by the bkOrigin parameter. For attachment tables, this must be zero.
  • lplRowsSought
    [in] Ignored.

Return Value

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

  • S_OK
    Indicates success.
  • MAPI_E_BUSY
    Another operation is in progress that prevents the row-seeking operation from starting. Either the operation in progress should be allowed to complete or it should be stopped.

Remarks

SeekRow establishes a new BOOKMARK_CURRENT position for the cursor. The lRowCount parameter indicates the number of rows that the cursor moves and the direction of movement. If the resulting position is beyond the last row of the table, the cursor is positioned after the last row. If the resulting position is before the first row of the table, the cursor is placed at the beginning of the first row

To search to the beginning of the table, pass zero in lRowCount and the value BOOKMARK_BEGINNING in bkOrigin.

If there are large numbers of rows in the table, the SeekRow operation can be slow. Do not set lRowCount to a number greater than 50.

Requirements

Header mapidefs.h
Library cemapi.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Pocket PC 2002 and later, Smartphone 2002 and later

See Also

Reference

IMAPITable
IMAPITable::QueryRows

Other Resources

Messaging