Funktionreferenz


_WinAPI_EqualMemory


Compares two blocks of memory to determine whether the specified number of bytes are identical

#include <WinAPIMem.au3>
_WinAPI_EqualMemory ( $pSource1, $pSource2, $iLength )

Parameter

$pSource1 A pointer to the block of memory to compare.
$pSource2 A pointer to the block of memory that is compared to the block of memory to which $pSource1 points.
$iLength The number of bytes to be compared.

Rückgabewert

Success: 1 - The two memory blocks are equivalent.
Failure: 0 and sets the @error flag to non-zero.

Bemerkungen

None.

Siehe auch

Suche nach RtlCompareMemory in der MSDN Bibliothek.

Beispiel

#include <WinAPIMem.au3>

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

_WinAPI_FillMemory($tStruct1, 8, 0x1D)
_WinAPI_FillMemory($tStruct2, 8, 0x1D)

ConsoleWrite('Zwei Strukturen sind gleich: ' & _WinAPI_EqualMemory($tStruct1, $tStruct2, 8) & @CRLF)