HRESULT SeekRow(
BOOKMARK bkOrigin,
LONG lRowCount,
LONG FAR * lplRowsSought
);
Moves the table cursor to a specific position.
Returns one of the following values:
S_OK
The seek operation was successful.
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.
MAPI_E_INVALID_BOOKMARK
The bookmark specified in the bkOrigin parameter is invalid because it has been removed or because it is beyond the last row requested.
MAPI_W_POSITION_CHANGED
The call succeeded, but the bookmark specified in the bkOrigin parameter is no longer set at the same row as when it was last used. If the bookmark has not been used, it is no longer in the same position as when it was created. When this warning is returned, the call should be handled as successful. To test for this warning, use the
FAILED macro.
bkOrigin
Bookmark identifying the starting position for the seek operation. A bookmark can be created using the CreateBookmark method, or one of the following predefined values can be passed:
BOOKMARK_BEGINNING
Starts the seek operation from the beginning of the table.
BOOKMARK_CURRENT
Starts the seek operation from the row in the table where the cursor is located.
BOOKMARK_END
Starts the seek operation from the end of the table.
lRowCount
Signed count of the number of rows to move, starting from the bookmark identified by the bkOrigin parameter.
lplRowsSought
If lplRowsSought is a valid pointer on input, on output it points to the number of rows that were processed in the seek operation. If lplRowsSought is NULL on input, the indication is the caller is not interested in the number of rows processed, and nothing is returned on output.