FltOpenVolume function (fltkernel.h)
The FltOpenVolume routine returns a handle and a file object pointer for the file system volume that a given minifilter driver instance is attached to.
NTSTATUS FLTAPI FltOpenVolume( [in] PFLT_INSTANCE Instance, [out] PHANDLE VolumeHandle, [out] PFILE_OBJECT *VolumeFileObject );
Opaque instance pointer for the instance. This instance must be attached to a local volume.
Handle for the file system volume.
Pointer to a caller-allocated variable that receives a file object pointer for the root directory of the volume. This parameter is optional and can be NULL.
FltOpenVolume returns STATUS_SUCCESS or an appropriate NTSTATUS value such as the following:
||The instance or volume is being torn down. This is an error code.|
||The instance is attached to a network volume. This is an error code.|
When the handle returned in the VolumeHandle parameter is no longer needed, the caller must release it by calling FltClose. Thus every successful call to FltOpenVolume must be matched by a subsequent call to FltClose.
If a file object pointer is returned in the VolumeFileObject parameter, the caller must release it when it is no longer needed by calling ObDereferenceObject.
The instance specified by the Instance parameter must be attached to a local volume. If it is attached to a network volume, FltOpenVolume returns STATUS_INVALID_PARAMETER.
To get a pointer to the device object for a given volume, call FltGetDeviceObject.
To get detailed information about the volume that a given instance is attached to, call FltQueryVolumeInformation.
NOTE: Do not call this routine with a non-NULL top level IRP value, as this can cause a system deadlock. To determine if the thread TopLevelIrp is set call IoGetTopLevelIrp.
|Minimum supported client||Available in Microsoft Windows 2000 Update Rollup 1 for SP4, Windows XP SP3, Windows Server 2003 SP1, and later versions of the Windows operating system.|
|Header||fltkernel.h (include Fltkernel.h)|