NotifyFilterDetachFromVolume Event

Fires when the filter has been detached from a filesystem volume.


virtual int FireNotifyFilterDetachFromVolume(CBFilterNotifyFilterDetachFromVolumeEventParams *e);
typedef struct {
const char *VolumeName;
int ResultCode; int reserved; } CBFilterNotifyFilterDetachFromVolumeEventParams;
virtual INT FireNotifyFilterDetachFromVolume(CBFilterNotifyFilterDetachFromVolumeEventParams *e);
typedef struct {
LPCWSTR VolumeName;
INT ResultCode; INT reserved; } CBFilterNotifyFilterDetachFromVolumeEventParams;


This event fires when the filter has been detached from the filesystem volume specified by VolumeName, typically due to the volume being unmounted. Please refer to the FireVolumeEvents property for more information.

Applications only need to handle this event if the FireVolumeEvents property includes the FS_MOUNT_NOTIFY 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 that use volume-specific rules should typically remove such rules during the AfterFilterDetachFromVolume event, which is fired synchronously, rather than this one.

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, set it to a non-zero value to report an appropriate error. Note, however, that this event fires after the operation has already completed, so reporting an error won't actually affect the operation itself. Please refer to the Error Reporting and Handling topic for more information.

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

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