// Virtual memory
#if (PHNT_MODE != PHNT_MODE_KERNEL)
_In_ HANDLE ProcessHandle,
_Inout_ PVOID *BaseAddress,
_Inout_ PSIZE_T RegionSize,
_Out_ PIO_STATUS_BLOCK IoStatus
This function is documented in Windows Driver Kit.
NtFlushVirtualMemory flushes mapped section view to file.
HANDLE of process containing mapped view of section to flush.
PVOID value containing address of memory area to flush.
On output this value is rounded to Page Size (0x1000).
ULONG value specifying length of area to flush. On output this value is rounded up to Page Size (0x1000).
IO_STATUS_BLOCK structure. After call Information member contains the same value as
WARNING: Two (or more) memory pages mapped in different calls of
NtMapViewOfSection cannot be flushed in one function call, even if both has the same SECTION as a source.