FsRtlGetNextLargeMcbEntry function (ntifs.h)

The FsRtlGetNextLargeMcbEntry routine retrieves a mapping run from a map control block (MCB).

Syntax

BOOLEAN FsRtlGetNextLargeMcbEntry(
       PLARGE_MCB Mcb,
  [in] ULONG      RunIndex,
       PLONGLONG  Vbn,
       PLONGLONG  Lbn,
       PLONGLONG  SectorCount
);

Parameters

Mcb

Pointer to an initialized MCB structure.

[in] RunIndex

Zero-based index of the requested mapping run.

Vbn

Pointer to a variable that receives the starting virtual block number (VBN) of the mapping run, or zero if the run does not exist. Its value is meaningless if FsRtlGetNextLargeMcbEntry returns FALSE.

Lbn

Pointer to a variable that receives the starting logical block number (LBN) of the mapping run, or zero if the run does not exist. Its value is meaningless if FsRtlGetNextLargeMcbEntry returns FALSE.

SectorCount

Pointer to a variable that receives the number of sectors in the mapping run, or zero if the run does not exist. Its value is meaningless if FsRtlGetNextLargeMcbEntry returns FALSE.

Return value

FsRtlGetNextLargeMcbEntry returns TRUE if the requested mapping run exists in the MCB, FALSE otherwise.

Remarks

FsRtlGetNextLargeMcbEntry retrieves the starting VBN, starting LBN, and sector count for a mapping run in an MCB.

Note   The upper 32 bits of the LBN are ignored. Only the lower 32 bits are used.
 
Holes are counted as runs.

The following code snippet shows how to print out all of the runs in a file:

for (i = 0; FsRtlGetNextLargeMcbEntry(Mcb,i,&Vbn,&Lbn,&Count); i++) {

    // print out vbn, lbn, and count

}

Requirements

Requirement Value
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= APC_LEVEL

See also

FsRtlAddLargeMcbEntry

FsRtlInitializeLargeMcb

FsRtlLookupLargeMcbEntry

FsRtlLookupLastLargeMcbEntry

FsRtlLookupLastLargeMcbEntryAndIndex

FsRtlNumberOfRunsInLargeMcb

FsRtlRemoveLargeMcbEntry

FsRtlSplitLargeMcb

FsRtlTruncateLargeMcb

FsRtlUninitializeLargeMcb