CallbackFilter.DeleteFilterRule method

Filter:

Pascal    C++ (Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET   

CallbackFilter     See also    

Overview

This method deletes the on-boot filter rule.

Declaration

[Pascal]
    function DeleteFilterDefaultRule(Mask : TCBString; AccessFlag : LongWord; ProductName : AnsiString): boolean;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    bool DeleteFilterDefaultRule(LPCWSTR Mask, CbFltAccessFlags AccessFlag, LPCSTR ProductName);

[C++ (VCL)]
    bool __fastcall DeleteFilterDefaultRule(WideString Mask, unsigned long AccessFlag, AnsiString ProductName);

[C++ (.NET)]
    bool DeleteFilterDefaultRule(String^ Mask, CbFltAccessFlags AccessFlag, String^ ProductName);

[C#]
    bool DeleteFilterDefaultRule(String Mask, CbFltAccessFlags AccessFlag, String ProductName);

[VB.NET]
    Function DeleteFilterDefaultRule(ByVal Mask As String, ByVal AccessFlag As CbFltAccessFlags, ByVal ProductName As String) As Boolean

Parameters

  • Mask - mask of the files to apply filter to
  • AccessFlag - access filter flag
  • ProductName - the name or symbolic identifier of the program that has set the rule

Return values

TRUE / true if the function succeeded or FALSE / false if the function failed.

Description

Use this method to remove the desired on-boot filter rule, previously set using AddFilterDefaultRule() method.

ProductName is used to distinguish the rules, set by different applications or modules. The value is used as a key in registry, so keep it short but unique. String format of GUID value works fine.

This method can be used only when the process works with Administrator or System Service rights or their equivalent. This means that you can setup the rules from the system service running under the default Service account, or from the installer, or from the application being run as Administrator. The requirement is caused by the need to modify entries under HKEY_LOCAL_MACHINE\System\CCS\Services key, which has restricted accessibility.

Read more about default rules.

See also

AddFilterDefaultRule     DisableDefaultRules     GetFilterDefaultCount     GetFilterDefaultRule