Function Reference


_WinAPI_ZeroMemory

Fills a block of memory with zeros

#include <WinAPISys.au3>
_WinAPI_ZeroMemory ( $pMemory, $iLength )

Parameters

$pMemory A pointer to the starting address of a memory to be filled.
$iLength The number of bytes to be filled.

Return Value

Success: 1.
Failure: 0 and sets the @error flag to non-zero.

See Also

Search RtlZeroMemory in MSDN Library.

Example

#include <WinAPISys.au3>

Local $tStruct = DllStructCreate('byte[8]')
ConsoleWrite(DllStructGetData($tStruct, 1) & @CRLF)

_WinAPI_FillMemory($tStruct, 8, 0xAB)
ConsoleWrite(DllStructGetData($tStruct, 1) & @CRLF)

_WinAPI_ZeroMemory($tStruct, 8)
ConsoleWrite(DllStructGetData($tStruct, 1) & @CRLF)