Expand Minimize

RtlZeroMemory routine

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(
  _Out_  VOID UNALIGNED *Destination,
  _In_   SIZE_T Length
);

Parameters

Destination [out]

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

Length [in]

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

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

Any level (See Remarks section)

DDI compliance rules

BufAfterReqCompletedIntIoctlA, BufAfterReqCompletedIoctlA, BufAfterReqCompletedReadA, BufAfterReqCompletedWriteA

See also

RtlFillMemory
RtlSecureZeroMemory

 

 

Send comments about this topic to Microsoft

Build date: 2/11/2014

Show:
© 2014 Microsoft. All rights reserved.