Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit editor mode

ZeroMemory macro

Feedback

In this article

Fills a block of memory with zeros.

To avoid any undesired effects of optimizing compilers, use theSecureZeroMemory function.

Syntax

void ZeroMemory(  [in] PVOID  Destination,  [in] SIZE_T Length);

Parameters

  • Destination [in]
    A pointer to the starting address of the block of memory to fill with zeros.

  • Length [in]
    The size of the block of memory to fill with zeros, in bytes.

Return value

This macro has no return value.

Remarks

Many programming languages include syntax for initializing complex variables to zero. There can be differences between the results of these operations and theZeroMemory function. UseZeroMemory to clear a block of memory in any programming language.

This macro is defined as theRtlZeroMemory macro. For more information, see WinBase.h and WinNT.h.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

WinBase.h (include Windows.h)

See also

CopyMemory

FillMemory

MoveMemory

SecureZeroMemory


  • Last updated on

In this article