The HrDelete method removes the current rule from the folder.
HRESULT HrDelete(
VOID
);
None.
See Return Values.
Also, HrDelete returns E_FAIL if one of the following conditions occurs:
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:
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.