函数参考


_WinAPI_FillMemory

Fills a block of memory with the given value.

#Include <WinAPIEx.au3>
_WinAPI_FillMemory ( $pMemory, $iLength [, $iValue] )

参数

$pMemory A pointer to the starting address of a memory to be filled.
$iLength The number of bytes to be filled.
$iValue [可选参数] The value to fill the memory.

返回值

成功: 返回 1.
失败: 返回 0 并设置 @error 标志为非 0 值.

注意/说明

None

相关

详情参考

在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)