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

OnReparseWithTag event/delegate/callback


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



This callback is called if file open operation has returned STATUS_REPARSE result code and there's a tag associated with the file.


    property OnReparseWithTag : TCbFltReparseWithTagEvent;
    TCbFltReparseWithTagEvent = procedure(Sender : TObject; FileName: TCBString; ReparseTag : DWORD; ReparseDataBuffer: pointer; ReparseDataBufferLength: word ) of Object;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    typedef void (*CbFltReparseWithTagEvent)(CallbackFilter* Sender, LPCWSTR FileName, DWORD ReparseTag, PVOID ReparseDataBuffer, USHORT ReparseDataBufferLength );

[C++ (VCL)]
    typedef void __fastcall (__closure *TCbFltReparseWithTagEvent)(System::TObject* Sender, TCBString FileName, DWORD ReparseTag, void * ReparseDataBuffer, unsigned short ReparseDataBufferLength );

[C++ (.NET)]
    public delegate void CbFltReparseWithTagEvent(CallbackFilter^ Sender, String^ FileName, UInt32 ReparseTag, IntPtr ReparseDataBuffer, unsigned short ReparseDataBufferLength );

    delegate void CbFltReparseWithTagEvent(CallbackFilter Sender, string FileName, UInt32 ReparseTag, IntPtr ReparseDataBuffer, UInt16 ReparseDataBufferLength );

    Delegate Sub CbFltReparseWithTagEvent(ByVal Sender As CallbackFilter, ByVal FileName As String, ByVal ReparseTag As UInt32, ByVal ReparseDataBuffer As IntPtr, ByVal ReparseDataBufferLength As UInt16)


  • Sender - reference to the class that called the delegate/event handler
  • FileName - the name of the file
  • ReparseTag - the tag associated with the file (see Description for details)
  • ReparseDataBuffer - The data associated with the reparse point (see Description for details)
  • ReparseDataBufferLength - The length of ReparseDataBuffer


It is possible to tag a specific file on the file system so that when someone is trying to open the file the file system itself will return STATUS_REPARSE and the filter can watch for STATUS_REPARSE response and check the tag of the file. If the tag belongs to the application, the latter can perform some operation on the file.

This callback is called right after the open operation has been completed with STATUS_REPARSE result code with the tag attached to this file.

For detailed information about what can be stored in the data buffer see REPARSE_GUID_DATA_BUFFER topic in MSDN. That topic also contains references to how reparse tags are issued, how GUIDs are associated with tags and more information about reparsing by tag.

Error handling

See Error handling topic for detailed information about how to report errors, which occur in the event handlers, back to CallbackFilter.

Back to top