RtlZeroMemory macro (wdm.h)

The RtlZeroMemory routine fills a block of memory with zeros, given a pointer to the block and the length, in bytes, to be filled.

Syntax

void RtlZeroMemory(
   void*  Destination,
   size_t Length
);

Parameters

[out] Destination

A pointer to the memory block to be filled with zeros.

[in] Length

The number of bytes to fill with zeros.

Return value

None

Remarks

To zero out a memory buffer to erase security-sensitive data, use RtlSecureZeroMemory instead.

Callers of RtlZeroMemory 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.

Requirements

Requirement Value
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h, Smclib.h, Minitape.h, Scsi.h, Storport.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL Any level (See Remarks section)
DDI compliance rules BufAfterReqCompletedIntIoctlA(kmdf), BufAfterReqCompletedIoctlA(kmdf), BufAfterReqCompletedReadA(kmdf), BufAfterReqCompletedWriteA(kmdf)

See also

RtlFillMemory

RtlSecureZeroMemory