Skip to content

Latest commit

 

History

History
120 lines (80 loc) · 4.36 KB

nf-fltkernel-fltgettopinstance.md

File metadata and controls

120 lines (80 loc) · 4.36 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.FltGetTopInstance
FltGetTopInstance function (fltkernel.h)
The FltGetTopInstance routine returns an opaque instance pointer for the minifilter driver instance that is attached at the top of the instance stack for a given volume.
ifsk\fltgettopinstance.htm
ifsk
04/16/2018
FltGetTopInstance function
FltApiRef_e_to_o_3f4205c4-12aa-43d4-b67f-258665d81164.xml, FltGetTopInstance, FltGetTopInstance routine [Installable File System Drivers], fltkernel/FltGetTopInstance, ifsk.fltgettopinstance
fltkernel.h
Fltkernel.h
Universal
FltMgr.lib
Fltmgr.sys
<= APC_LEVEL
Windows
FltGetTopInstance
fltkernel/FltGetTopInstance
APIRef
kbSyntax
DllExport
fltmgr.sys
FltGetTopInstance

FltGetTopInstance function

-description

The FltGetTopInstance routine returns an opaque instance pointer for the minifilter driver instance that is attached at the top of the instance stack for a given volume.

-parameters

-param Volume [in]

Opaque pointer for the volume.

-param Instance [out]

Pointer to a caller-allocated variable that receives an opaque instance pointer for the bottom instance for this volume. This parameter is required and cannot be NULL.

-returns

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

Return code Description
STATUS_NO_MORE_ENTRIES
No matching instance was found. This is a warning code.

-remarks

An instance is said to be at the top of the minifilter driver instance stack if its altitude is higher than that of all other instances attached to the same volume. The term "altitude" refers to the position that an instance occupies in the minifilter driver instance stack for a volume. The higher the altitude, the farther the instance is from the base file system in the stack. Only one instance can be attached at a given altitude on a given volume.

Altitude is specified by an altitude string, which is a counted Unicode string consisting of one or more decimal digits from 0 through 9, and it can include a single decimal point. For example, "100.123456" and "03333" are valid altitude strings.

The string "03333" represents a higher altitude than "100.123456". (Leading and trailing zeros are ignored.) In other words, an instance whose altitude is "03333" is farther from the base file system than an instance whose altitude is "100.123456". However, this comparison is only meaningful if both instances are attached to the same volume.

FltGetTopInstance adds a rundown reference to the opaque instance pointer returned in the Instance parameter. When this pointer is no longer needed, the caller must release it by calling FltObjectDereference. Thus every successful call to FltGetTopInstance must be matched by a subsequent call to FltObjectDereference.

-see-also

FltAttachVolume

FltAttachVolumeAtAltitude

FltCompareInstanceAltitudes

FltGetBottomInstance

FltGetLowerInstance

FltGetUpperInstance

FltObjectDereference