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 : TCBFSFltReparseWithTagEvent;
    TCBFSFltReparseWithTagEvent = 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 (*CBFSFltReparseWithTagEvent)(CBFSFilter* Sender, LPCWSTR FileName, DWORD ReparseTag, PVOID ReparseDataBuffer, USHORT ReparseDataBufferLength );

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

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

    delegate void CBFSFltReparseWithTagEvent(CBFSFilter Sender, string FileName, UInt32 ReparseTag, IntPtr ReparseDataBuffer, UInt16 ReparseDataBufferLength );

    Delegate Sub CBFSFltReparseWithTagEvent(ByVal Sender As CBFSFilter, 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 CBFSFilter.