다음을 통해 공유


ITableData::HrDeleteRows

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.

Deletes multiple table rows.

HRESULT HrDeleteRows(
  ULONG ulFlags,
  LPSRowSet lprowsetToDelete,
  ULONG FAR * cRowsDeleted
);

Parameters

  • ulFlags
    [in] A bitmask of flags that controls the deletion. The following flag can be set:

    • TAD_ALL_ROWS
      Deletes all rows from the table and all corresponding views, sending a single TABLE_RELOAD notification.
  • lprowsetToDelete
    [in] A pointer to a row set that describes the rows to be deleted. The lprowsetToDelete parameter can be NULL if the TAD_ALL_ROWS flag is set in the ulFlags parameter.

  • cRowsDeleted
    [out] The count of the deleted rows.

Return Value

  • S_OK
    The table rows were successfully deleted.

Remarks

The ITableData::HrDeleteRows method locates and removes the table rows that contain the columns that match the property pointed to by the lpProps member of each aRow entry in the row set. An index column is used to identify each row; this column must have the same property tag as the property tag passed in the ulPropTagIndexColumn parameter in the call to the CreateTable function.

The number of rows that were actually deleted is returned in cRowsDeleted. No error is returned if one or more rows could not be found.

After the rows are deleted, 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.

Deleting rows does not reduce the columns available to existing table views or subsequently opened table views, even if the deleted rows are the last that have values for a specific column.

See Also

Reference

CreateTable

ITableData::HrDeleteRow

ITableData::HrModifyRows

SRowSet

TABLE_NOTIFICATION

ITableData : IUnknown