// ntddk.h
NTSYSAPI NTSTATUS RtlFlushNonVolatileMemory(
PVOID NvToken,
PVOID NvBuffer,
SIZE_T Size,
ULONG Flags
);
View the official Windows Driver Kit DDI referenceNo description available.
The routine RtlFlushNonVolatileMemory optimally flushes the given non-volatile memory region.
NvTokenA pointer to an opaque structure that has information about various properties of the non-volatile memory region which RtlGetNonVolatileToken had returned.
NvBufferA pointer to the non-volatile memory to flush. This should be user addresses obtained from a file mapping object.
SizeThe length, in bytes, of the non-volatile memory buffer NvBuffer points to.
FlagsOne of the following flags can be specified:
| Flags | Meaning |
|---|---|
| FLUSH_NV_MEMORY_IN_FLAG_NO_DRAIN | Specifies that this routine does not need to wait for the flush to drain. |
The routine RtlFreeNonVolatileToken returns one of the status codes:
| Return code | Description |
|---|---|
| STATUS_INVALID_PARAMETER | NvToken is an invalid pointer or token. |
| STATUS_SUCCESS | The request was successful. |
This routine RtlFlushNonVolatileMemory can also add more context to NvToken to help verifiers. This routine is currently not supported for Windows Server until the next major release of Windows Server.
RtlFlushNonVolatileMemoryRanges