CBFS Filter 2020 C++ Builder Edition

Questions / Feedback?

AfterFilterAttachToVolume Event

Fires after the filter attaches to a newly-mounted filesystem volume.

Syntax

typedef struct {
  String VolumeName;
  int ResultCode;
} TcbfCBMonitorAfterFilterAttachToVolumeEventParams;

typedef void __fastcall (__closure *TcbfCBMonitorAfterFilterAttachToVolumeEvent)(System::TObject* Sender, TcbfCBMonitorAfterFilterAttachToVolumeEventParams *e);

__property TcbfCBMonitorAfterFilterAttachToVolumeEvent OnAfterFilterAttachToVolume = { read=FOnAfterFilterAttachToVolume, write=FOnAfterFilterAttachToVolume };

Remarks

This event fires after the filter attaches to the newly-mounted filesystem volume specified by VolumeName. Please refer to the FireVolumeEvents property for more information.

Applications only need to handle this event if the FireVolumeEvents property includes the FS_MOUNT_CONTROL flag. Please note that this event won't fire for any volumes skipped during the BeforeFilterAttachToVolume event; please refer to its documentation for more information.

Applications can use this event to add volume-specific rules for the volume that has been mounted (keeping in mind that this event does not fire for volumes that are already present when StartFilter is called). Applications that intend to do so must ensure that proper thread synchronization techniques are used when manipulating or enumerating the rule lists, since this event's handler will always execute in the context of some worker thread.

The format of the VolumeName parameter's value depends on whether the ResolveNtDeviceToDriveLetter configuration setting is enabled; please refer to its documentation for more information. Applications can obtain additional information about a volume by retrieving its GUID using the GetVolumeGUID method, and then using that GUID to call various Windows API functions.

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) 2020 Callback Technologies, Inc. - All rights reserved.
CBFS Filter 2020 C++ Builder Edition - Version 20.0 [Build 7543]