Funktionreferenz


_WinAPI_FillMemory


Fills a block of memory with the given value

#include <WinAPIMem.au3>
_WinAPI_FillMemory ( $pMemory, $iLength [, $iValue = 0] )

Parameter

$pMemory A pointer to the starting address of a memory to be filled.
$iLength The number of bytes to be filled.
$iValue [optional] The value to fill the memory. Default is 0.

Rückgabewert

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

Bemerkungen

None.

Siehe auch

Suche nach RtlFillMemory in der MSDN Bibliothek.

Beispiel

#include <WinAPIMem.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)