Partager via


ITableData::HrModifyRow

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Inserts a new table row, possibly replacing an existing row.

HRESULT HrModifyRow(
  LPSRow lpSRow
);

Parameters

  • lpSRow
    [in] A pointer to an SRow structure that describes the row to be added or to replace an existing row. One of the property value structures pointed to by the lpProps member of the SRow structure should contain the index column, the same value that was specified in the ulPropTagIndexColumn parameter in the call to the CreateTable function.

Return Value

  • S_OK
    The row was successfully inserted or modified.

  • MAPI_E_INVALID_PARAMETER
    The passed-in row does not have an index column.

Remarks

The ITableData::HrModifyRow method inserts the row described by the SRow structure pointed to by the lpSRow parameter. If a row that has the same value for its index column as the row that lpSRow points to already exists in the table, the existing row is replaced. If no row exists that matches the one included in the SRow structure, HrModifyRow adds the row to the end of the table.

All views of the table are modified to include the row pointed to by lpSRow. However, if a view has a restriction in place that excludes the row, it may not be visible to the user.

The columns in the row pointed to by lpSRow do not have to be in the same order as the columns in the table. The caller can also include as columns properties that are not currently in the table. For existing views, HrModifyRow makes these new columns available but does not include them in the current column set. For future views, HrModifyRow includes the new columns in the column set.

After HrModifyRow adds the row, notifications are sent to all clients or service providers that have a view of the table and that have called the table's IMAPITable::Advise method to register for notifications.

See Also

Reference

SRow

TABLE_NOTIFICATION

ITableData : IUnknown