#ifndef _NTPFAPI_H
/**
* The PF_PFN_PRIO_REQUEST structure queries or updates a variable array of page-frame entries.
* \remarks On x64, entries begin at offset 0xc0 and occupy 24 bytes each; the minimum
* payload is 0xd8 bytes (one entry), aligned to 8 bytes. PfnCount must be nonzero and the supplied buffer
* must cover 0xc0 + 24 * PfnCount bytes. The computed size must fit in ULONG. The declared 256-element
* arrays are compatibility declarations, not a fixed request-size requirement or a maximum count.
* Query class 6 copies only each input PageFrameIndex into a zeroed identity record before querying it.
* Set classes 7 and 29 can copy the entries back on operation failure; class 22 copies relocation results back.
*/
typedef struct _PF_PFN_PRIO_REQUEST
{
ULONG Version; // Request version: PF_PFN_PRIO_REQUEST_VERSION (1).
ULONG RequestFlags; // Classes 6/7: bit 0 only; class 22 passes the low/high USHORTs to MmRelocatePfnList.
SIZE_T PfnCount; // Nonzero; buffer size is FIELD_OFFSET(..., PageData) + PfnCount * sizeof(MMPFN_IDENTITY).
SYSTEM_MEMORY_LIST_INFORMATION MemInfo; // Memory-list statistics associated with the request.
union
{
// Class 6: input PFNs, output identities. Class 16 uses PF_MEMORY_LIST_INFO instead.
MMPFN_IDENTITY PageIdentities[256]; // Variable-length array with PfnCount entries.
MMPFN_IDENTITY PageData[256]; // Compatibility name.
// Classes 7, 22 and 29: caller-supplied entries; copy-back behavior is described above.
PFN_TRIPLET Entries[256]; // Variable array of PfnCount update or relocation entries; 256 is the declared capacity, not a limit.
};
} PF_PFN_PRIO_REQUEST, *PPF_PFN_PRIO_REQUEST;
View code on GitHubNo description available.