ITableData::HrEnumRow

Last modified: July 23, 2011

Applies to: Outlook

Retrieves a row based on its position in the table.

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

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.

S_OK

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

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.

Show:
© 2014 Microsoft