ITableData::HrEnumRow

Applies to: Outlook 2013 | Outlook 2016

Retrieves a row based on its position in the table.

HRESULT HrEnumRow(
  ULONG ulRowNumber,
  LPSRow FAR * lppSRow
);

Parameters

ulRowNumber

[in] The number of the row for which to return properties. The value in the ulRowNumber parameter can be any value from 0, which indicates the first row in the table, through n - 1, which indicates the last row in the table.

lppSRow

[out] A pointer to a pointer to an SRow structure that describes the target row.

Return value

S_OK

The row was retrieved successfully, or a row for the row number specified by the ulRowNumber parameter does not exist.

Remarks

The ITableData::HrEnumRow method retrieves a row based on a sequential number. This number represents the order of insertion (0 indicates the first row, and the number of rows minus 1 indicates the last row). MAPI maintains this chronological order of row insertion for the lifetime of the table data object.

If the number specified in ulRowNumber does not correspond to a row in the table, HrEnumRow returns S_OK and sets the lppSRow parameter to NULL.

MAPI allocates memory for the returned SRow structure by using the MAPIAllocateBuffer function when the table data object is created. The caller must release this memory by calling the MAPIFreeBuffer function.

To retrieve rows from a table in the order that they were inserted, table data object users call the HrEnumRow method.

See also

MAPIAllocateBuffer

MAPIFreeBuffer

SRow

ITableData : IUnknown