#ifndef _NTPFAPI_H
/**
* The PF_PREFETCH_REQUEST structure supplies a variable-length file and private-page prefetch request.
*/
typedef struct _PF_PREFETCH_REQUEST
{
ULONG Version; // PF_PREFETCH_REQUEST_VERSION
ULONG Size; // Entire buffer size, including the 0x80-byte header (x64).
ULONG VolumeCount; // Number of PF_PREFETCH_VOLUME_INFO records.
ULONG PrefetchFileCount; // Total number of PF_PREFETCH_FILE_INFO records.
ULONG RangeCount; // Number of PF_PREFETCH_RANGE records, not paths.
ULONG SourceCount; // Number of PF_PREFETCH_SOURCE_INFO records.
ULONG UnicodeTextSize; // Bytes.
USHORT PrefetchPriority; // 0..7.
USHORT VolumePrefetchPriority; // 0..7.
ULONG VolumeInfoOffset; // Byte offset to the volume records; zero when VolumeCount is zero.
ULONG Reserved0; // Reserved field; initialize to zero and do not interpret on output.
ULONG PrefetchFileInfoOffset; // Byte offset to the file records; zero when PrefetchFileCount is zero.
ULONG Reserved1; // Reserved field; initialize to zero and do not interpret on output.
ULONG RangeInfoOffset; // Byte offset to PF_PREFETCH_RANGE records; zero when RangeCount is zero.
ULONG Reserved2; // Reserved field; initialize to zero and do not interpret on output.
ULONG SourceInfoOffset; // Byte offset to private-source records; zero when SourceCount is zero.
ULONG Reserved3; // Reserved field; initialize to zero and do not interpret on output.
ULONG UnicodeTextOffset; // Byte offset to the UTF-16 text area; zero when UnicodeTextSize is zero.
ULONG Reserved4; // Reserved field; initialize to zero and do not interpret on output.
HANDLE CompletionEvent; // Optional event handle; captured as an object in the kernel's private copy.
union
{
ULONG Flags; // Packed request flags and scenario selector.
struct
{
ULONG ContinueIO : 1; // Bit 0: Continue-I/O flag retained from the reconstructed layout.
ULONG LowPowerMode : 1; // Bit 1: Low-power flag retained from the reconstructed layout.
ULONG UseScenarioTimeouts : 1; // Bit 2: Selects scenario-timeout and trickled-prefetch processing.
ULONG OtherFlags : 3; // Accepted bits whose semantics are not yet identified.
ULONG ReservedFlags : 2; // Must be zero.
ULONG ScenarioType : 8; // PF_PHASED_SCENARIO_TYPE, 0..5.
ULONG Spare : 16; // Reserved field; initialize to zero and do not interpret on output.
};
};
ULONG FilePrefetchCount; // Output count of files considered for prefetching.
ULONG MetadataPrefetchCount; // Output count of metadata prefetch operations.
ULONG PrivatePrefetchCount; // Output count of private-source prefetch operations.
ULONG FilePageCount; // Output page count for the first file-prefetch pass.
ULONG FilePageCountSecondPass; // Output page count for the second file-prefetch pass.
ULONG PrivatePageCount; // Output count of private pages submitted for prefetching.
ULONG MetadataPrefetchTime; // Milliseconds.
ULONG FilePrefetchTime; // Milliseconds.
ULONG FilePrefetchTimeSecondPass; // Milliseconds.
ULONG PrivatePrefetchTime; // Milliseconds.
ULONG Reserved5; // Reserved field; initialize to zero and do not interpret on output.
} PF_PREFETCH_REQUEST, *PPF_PREFETCH_REQUEST;
View code on GitHubNo description available.