CallbackFilter

Instant control over file and folder operations in Windows and .NET applications

CallbackFilter.AddFilterCallbackRule method

Filter:

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

CallbackFilter     See also    

Overview

This method adds a filter callback rule.

Declaration

[Pascal]
    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);

[C#]
    bool AddFilterCallbackRule(String Mask, CbFltCallbackFlags CallbackFlag);

[VB.NET]
    Function AddFilterCallbackRule(ByVal Mask As String, ByVal CallbackFlag As CbFltCallbackFlags) As Boolean

Parameters

  • 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

Description

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