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, the filter is in passive mode, i.e. not working. After AttachFilter was called you should not call it again without prior call to DetachFilter.

The 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 the timeout to 0 when you do debugging of your callback functions. Remember to set the timeout to some reasonable value (for example, 30 seconds) in your release version.

In the Minifilter mode, is is necessary to call Initialize() method before attaching the driver.

If you want to attach the filter to the mounted remote shared disk, please see Monitoring of network resources topic for details and limitations.


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.
The method can return "Device Not Ready" error (code 21) if Initialize() method has not been called before the call to AttachFilter().

See also

DetachFilter     Initialize     Driver installation