Share via


IMAPITable::QueryPosition

4/8/2010

The QueryPosition method retrieves the current table row position of the cursor.

Note

This method is supported for contents tables only.

Syntax

HRESULT QueryPosition (
  ULONG FAR * lpulRow,
  ULONG FAR * lpulNumerator,
  ULONG FAR * lpulDenominator
);

Parameters

  • lpulRow
    [out] Reference to the row number of the current row. The row number is zero-based; the first row in the table is zero.
  • lpulNumerator
    [out] Not used.
  • lpulDenominator
    [out] Not used.

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.

Remarks

QueryPosition determines the current row position and returns the number of the current row. MAPI defines the current row as the next row to be read.

You can use QueryPosition to position a scroll box in a scroll bar. For example, in a table containing 100 rows, if QueryPosition returns a value of 75 in the lpulRow parameter, you can position the scroll box 3/4 of the way across the scroll bar.

A call to QueryPosition might involve large amounts of memory, particularly for large categorized tables. If the lpulRow parameter is set to 0xFFFFFFFF, too much memory was required for QueryPosition to determine the current row.

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

Other Resources

Messaging