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

CallbackFilter.AttachFilter method


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

CallbackFilter     See also    


Attaches the filter.


    procedure AttachFilter(Timeout : integer);

[C++ (Lib)]
    void AttachFilter(int Timeout);

[C++ (VCL)]
    void __fastcall AttachFilter(int Timeout);

[C++ (.NET)]
    void AttachFilter(UInt32 Timeout);

    void AttachFilter(UInt32 Timeout);

    Sub AttachFilter(ByVal Timeout As UInt32)


  • Timeout - timeout of the callback operations (in milliseconds)


Call this method to start filtering requests to the file system. Before this method is called, filter is in passive mode, i.e. not working. After AttachFilter was called you should not call it again without prior call to DetachFilter.

Timeout for callback operations is specified in milliseconds. The value of 0 (zero) means "callback will work as long as it needs". It's good idea to set timeout to 0 when you do debugging of your callback functions. Remember to set timeout to some reasonable value (for example, 30 seconds) for release version.


The method can return "File not found" error if the driver has not been properly installed or the system was not restarted despite the RebootNeeded flag set to non-zero value after the call to Install method.

See also

DetachFilter     Driver installation    

Back to top