Remplit un bloc de mémoire avec des zéros
#include <WinAPIMem.au3>
_WinAPI_ZeroMemory ( $pMemory, $iLength )
$pMemory | Le pointeur sur l'adresse de début de la mémoire à remplir. |
$iLength | Le nombre d'octets à remplir. |
Succès: | Retourne 1. |
Échec: | Retourne 0 et définit @error <> 0. |
Consultez RtlZeroMemory dans la librairie MSDN.
#include <WinAPIMem.au3> Local $tStruct = DllStructCreate('byte[8]') ConsoleWrite(DllStructGetData($tStruct, 1) & @CRLF) _WinAPI_FillMemory(DllStructGetPtr($tStruct), 8, 0xAB) ConsoleWrite(DllStructGetData($tStruct, 1) & @CRLF) _WinAPI_ZeroMemory(DllStructGetPtr($tStruct), 8) ConsoleWrite(DllStructGetData($tStruct, 1) & @CRLF)