// ntddk.h
NTSYSAPI NTSTATUS RtlWriteNonVolatileMemory(
PVOID NvToken,
VOID *NvDestination,
const VOID *Source,
SIZE_T Size,
ULONG Flags
);
View the official Windows Driver Kit DDI referenceNo description available.
The routine RtlWriteNonVolatileMemory copies the contents of a source buffer to a non-volatile destination memory buffer.
NvTokenA pointer to an opaque structure that has information about various properties of the non-volatile memory region which RtlGetNonVolatileToken had returned.
NvDestinationA pointer to the non-volatile destination buffer to copy to.
SourceA pointer to the source buffer to copy from.
SizeThe length, in bytes, of the copy operation.
FlagsReserved for future use.
The routine RtlWriteNonVolatileMemory returns one of the following:
| Return code | Description |
|---|---|
| STATUS_INVALID_PARAMETER | NvToken is an invalid pointer or token. |
| STATUS_SUCCESS | The request was successful. |
This is a RtlCopyMemory equivalent for non-volatile memory the value add is only with verifier enabled. When the verifier is enabled, ranges that are modified can be tracked in NvToken and can be reported in RtlFreeNonVolatileToken if a flush is not called for a write. This routine is currently not supported for Windows Server until the next major release of Windows Server.
RtlFlushNonVolatileMemoryRanges