FltGetDeviceObject
TOC
Collapse the table of content
Expand the table of content

FltGetDeviceObject routine

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

Syntax


NTSTATUS FltGetDeviceObject(
  _In_  PFLT_VOLUME    Volume,
  _Out_ PDEVICE_OBJECT *DeviceObject
);

Parameters

Volume [in]

Opaque pointer for the volume.

DeviceObject [out]

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

Return value

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

Return codeDescription
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.

Requirements

Target platform

Universal

Header

Fltkernel.h (include Fltkernel.h)

Library

Fltmgr.lib

IRQL

<= DISPATCH_LEVEL

See also

FltGetDiskDeviceObject
FltGetVolumeFromDeviceObject
IoGetDeviceAttachmentBaseRef
ObDereferenceObject

 

 

Send comments about this topic to Microsoft

Show:
© 2016 Microsoft