用0填充内存块
#Include <WinAPIEx.au3>
_WinAPI_ZeroMemory ( $pMemory, $iLength )
$pMemory | 要填充的内存的开始地址的指针 |
$iLength | 填充的字节数 |
成功: | 返回 1 |
失败: | 返回 0并设置@error非0 |
在MSDN中搜索
#Include <WinAPIEx.au3>
Opt('MustDeclareVars', 1)
Global $tStruct = DllStructCreate('byte[8]')
ConsoleWrite(DllStructGetData($tStruct, 1) & @CR)
_WinAPI_FillMemory(DllStructGetPtr($tStruct), 8, 0xAB)
ConsoleWrite(DllStructGetData($tStruct, 1) & @CR)
_WinAPI_ZeroMemory(DllStructGetPtr($tStruct), 8)
ConsoleWrite(DllStructGetData($tStruct, 1) & @CR)