Skip to content

Latest commit

 

History

History
87 lines (65 loc) · 3.52 KB

nf-fltkernel-fltgetdeviceobject.md

File metadata and controls

87 lines (65 loc) · 3.52 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NF:fltkernel.FltGetDeviceObject
FltGetDeviceObject function (fltkernel.h)
The FltGetDeviceObject routine returns a pointer to the Filter Manager's volume device object (VDO) for a given volume.
ifsk\fltgetdeviceobject.htm
ifsk
04/16/2018
FltGetDeviceObject function
FltApiRef_e_to_o_0ef7e26f-6eb6-42e3-a469-4d4fa0c8e659.xml, FltGetDeviceObject, FltGetDeviceObject routine [Installable File System Drivers], fltkernel/FltGetDeviceObject, ifsk.fltgetdeviceobject
fltkernel.h
Fltkernel.h
Universal
Fltmgr.lib
Fltmgr.sys
<= DISPATCH_LEVEL
Windows
FltGetDeviceObject
fltkernel/FltGetDeviceObject
APIRef
kbSyntax
DllExport
fltmgr.sys
FltGetDeviceObject

FltGetDeviceObject function

-description

The FltGetDeviceObject routine returns a pointer to the Filter Manager's volume device object (VDO) for a given volume.

-parameters

-param Volume [in]

Opaque pointer for the volume.

-param DeviceObject [out]

Pointer to a caller-allocated variable that receives the volume device object pointer. This parameter is required and cannot be NULL.

-returns

FltGetDeviceObject returns STATUS_SUCCESS or an appropriate NTSTATUS value such as the following:

Return code Description
STATUS_FLT_NO_DEVICE_OBJECT The requested device object does not exist for the given volume. This is an error code.

-remarks

FltGetDeviceObject returns a pointer to the Filter Manager's volume device object (VDO) for the given volume.

For more information about volume device objects, see File System Stacks.

The Filter Manager's VDO is not the same as the underlying storage driver's disk device object or the base file system's VDO. To get a pointer to the disk device object, call FltGetDiskDeviceObject on the volume specified in the Volume parameter. To get a pointer to the base file system's VDO, call IoGetDeviceAttachmentBaseRef on the RetDeviceObject returned by FltGetDeviceObject.

To get an opaque pointer for the corresponding volume for a given device object, call FltGetVolumeFromDeviceObject.

FltGetDeviceObject increments the reference count on the returned device object pointer. When this pointer is no longer needed, the caller must decrement this reference count by calling ObDereferenceObject. Thus every successful call to FltGetDeviceObject must be matched by a subsequent call to ObDereferenceObject.

-see-also

FltGetDiskDeviceObject

FltGetVolumeFromDeviceObject

IoGetDeviceAttachmentBaseRef

ObDereferenceObject