Moves a block of memory from one location to another.
#Include <WinAPIEx.au3>
_WinAPI_MoveMemory ( $pDestination, $pSource, $iLength )
$pDestination | A pointer to the starting address of the move destination. |
$pSource | A pointer to the starting address of the block of memory to be moved. |
$iLength | The size of the block of memory to move, in bytes. |
成功: | 返回 1. |
失败: | 返回 0 并设置 @error 标志为非 0 值. |
在MSDN中搜索
#Include <WinAPIEx.au3>
Opt('MustDeclareVars', 1)
Global $tStruct1 = DllStructCreate('dword')
Global $tStruct2 = DllStructCreate('byte[4]')
DllStructSetData($tStruct1, 1, 0x11223344)
_WinAPI_MoveMemory(DllStructGetPtr($tStruct2), DllStructGetPtr($tStruct1), 4)
ConsoleWrite('0x' & Hex(DllStructGetData($tStruct1, 1)) & @CR)
ConsoleWrite(DllStructGetData($tStruct2, 1) & @CR)