CBFS Filter 2020 C++ Builder Edition

Questions / Feedback?

ReparseWithTag Event

Fires if an open operation returns STATUS_REPARSE so that the application can respond to the reparse point.


typedef struct {
  String FileName;
  int ReparseTag;
  void* ReparseBuffer;
  int ReparseBufferLength;
  bool ReissueIO;
  int ResultCode;
} TcbfCBFilterReparseWithTagEventParams;

typedef void __fastcall (__closure *TcbfCBFilterReparseWithTagEvent)(System::TObject* Sender, TcbfCBFilterReparseWithTagEventParams *e);

__property TcbfCBFilterReparseWithTagEvent OnReparseWithTag = { read=FOnReparseWithTag, write=FOnReparseWithTag };


This event fires if a STATUS_REPARSE result is returned when the OS attempts to open the file or directory specified by FileName, which indicates that there is a reparse point associated with said file or directory. More specifically, it fires immediately after the open operation returns such a result.

It is possible for applications to add reparse points to specific files/directories so that the filesystem will return STATUS_REPARSE when someone attempts to open them. Such applications can then use this event to perform some operation on the file/directory, assuming that the specified ReparseTag belongs to the application. Please refer to Microsoft's Reparse Point articles for more information.

Applications only need to handle this event if they've added a standard filter rule that includes the FS_CE_REPARSE_TAG flag.

The ReparseTag parameter reflects the reparse point's tag, which is the value the system uses to identify the format of the reparse point data. This value is also present in the ReparseBuffer data; the component extracts it and provides it separately for convenience.

The ReparseBuffer parameter points to a memory buffer that contains the full reparse point data. The ReparseBufferLength parameter reflects the length of ReparseBuffer. Please refer to the Buffer Parameters topic for more information on how to work with memory buffer event parameters.

The data itself is formatted as either a REPARSE_GUID_DATA_BUFFER structure or (for certain Microsoft-reserved tags) a REPARSE_DATA_BUFFER structure; please refer to Microsoft's documentation for more information.

ReissueIO can be set to true to instruct the OS to resend the original request again from the beginning. This may be necessary if the reparse tag is removed from the file or altered during this event.

The ResultCode parameter will always be 0 when the event is fired. If the event cannot be handled in a "successful" manner for some reason (e.g., a resource isn't available, security checks failed, etc.), set it to a non-zero value to report an appropriate error. Please refer to the Error Reporting and Handling topic for more information.

This event is fired synchronously; please refer to the Event Types topic for more information.

Copyright (c) 2021 Callback Technologies, Inc. - All rights reserved.
CBFS Filter 2020 C++ Builder Edition - Version 20.0 [Build 7836]