RtlFillMemory macro (wdm.h)

The RtlFillMemory routine fills a block of memory with the specified fill value.


void RtlFillMemory(
   void*  Destination,
   size_t Length
   int    Fill


[out] Destination

A pointer to the block of memory to be filled.

[in] Length

The number of bytes in the block of memory to be filled.

[in] Fill

The value to fill the destination memory block with. This value is copied to every byte in the memory block that is defined by Destination and Length.

Return value



Callers of RtlFillMemory can be running at any IRQL if the destination memory block is in nonpaged system memory. Otherwise, the caller must be running at IRQL <= APC_LEVEL.


Requirement Value
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtDll.lib (user mode); NtosKrnl.lib (kernel mode)
DLL Kernel32.dll (user mode); NtosKrnl.exe (kernel mode)
IRQL Any level (See Remarks section)

See also