Function Reference


_WinAPI_MoveMemory

Moves a block of memory from one location to another

#include <WinAPIMem.au3>
_WinAPI_MoveMemory ( $pDestination, $pSource, $iLength )

Parameters

$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.

Return Value

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

Remarks

The source and destination blocks may overlap.

See Also

Search RtlMoveMemory in MSDN Library.

Example

#include <WinAPIMem.au3>

Local $tStruct1 = DllStructCreate('int')
Local $tStruct2 = DllStructCreate('byte[4]')

DllStructSetData($tStruct1, 1, 0x11223344)

_WinAPI_MoveMemory($tStruct2, $tStruct1, 4)

ConsoleWrite('0x' & Hex(DllStructGetData($tStruct1, 1)) & @CRLF)
ConsoleWrite(DllStructGetData($tStruct2, 1) & @CRLF)