IExchangeFolderRules::HrDelete

The HrDelete method removes the current rule from the folder.

HRESULT HrDelete(
  VOID  
);
 

Parameters

None.

Return Values

See Return Values.

Also, HrDelete returns E_FAIL if one of the following conditions occurs:

An attempt was made to delete a rule when the cursor is at the end of the rules table (no current member).
The current cursor position, as returned by the HrTell method, is RULE_PAST_END.

In addition, when creating, modifying, or deleting rules, the MAPI_W_PARTIAL_SUCCESS error is returned if at least one rule operation (create, modify, or delete) is successful, but not all the operations are successful. A rule operation fails under the following circumstances:

  1. The rule condition is invalid.
  2. The rule action is missing or invalid.
  3. A non-string property type has been given for a rule provider name or a rule name.
  4. A rule property is invalid.

Remarks

If you only want to disable the rule, use the HrDisable method. You can then later enable the rule with the HrEnable method.

For more information, see RULEEDIT: Manipulating Rules.

See Also

IExchangeFolderRules