Control over registry operations in Windows and .NET applications

CallbackRegistry.AddFilterCallbackRule method


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

CallbackRegistry     See also    


This method adds a filter callback rule.


    function AddFilterCallbackRule(Mask : TCBString; CallbackFlag : LongWord): boolean;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    bool AddFilterCallbackRule(LPCWSTR Mask, CbFltCallbackFlags CallbackFlag);

[C++ (VCL)]
    bool __fastcall AddFilterCallbackRule(WideString Mask, unsigned CallbackFlag);

[C++ (.NET)]
    bool AddFilterCallbackRule(String^ Mask, CbFltCallbackFlags CallbackFlag);

    bool AddFilterCallbackRule(String Mask, CbFltCallbackFlags CallbackFlag);

    Function AddFilterCallbackRule(ByVal Mask As String, ByVal CallbackFlag As CbFltCallbackFlags) As Boolean


  • Mask - mask of the files to apply the filter to
  • CallbackFlag - flags to be set on files that match the Mask

Return values

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

CallbackFlag values


Use this method to add a filter callback rule. It means, that whenever some application (or the OS itself) tries to perform certain operations, specified by CallbackFlag, the corresponding callback will be called and it will notify your application about the event. If the callback function is not associated for the specific callback type, the request is processed as usually.

For example, if CallbackFlag is set to fltReadCallback, the OnReadFileC event will be fired if an application tries to read the file, whose name matches Mask.

Process-specific rules are supported.

Read more about masks.

See also

AddFilterAccessRule     DeleteFilterRule    

Back to top