Funktionreferenz


_WinAPI_MoveMemory


Moves a block of memory from one location to another

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

Parameter

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

Rückgabewert

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

Bemerkungen

The source and destination blocks may overlap.

Siehe auch

Suche nach RtlMoveMemory in der MSDN Bibliothek.

Beispiel

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