Compares two blocks of memory to determine whether the specified number of bytes are identical
#include <WinAPIMem.au3>
_WinAPI_EqualMemory ( $pSource1, $pSource2, $iLength )
$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. |
Success: | 1 - The two memory blocks are equivalent. |
Failure: | 0 and sets the @error flag to non-zero. |
Search RtlCompareMemory in MSDN Library.
#include <WinAPIMem.au3>
Local $tStruct1 = DllStructCreate('byte[8]')
Local $tStruct2 = DllStructCreate('byte[8]')
_WinAPI_FillMemory($tStruct1, 8, 0x1D)
_WinAPI_FillMemory($tStruct2, 8, 0x1D)
ConsoleWrite('Two structures are equivalent: ' & _WinAPI_EqualMemory($tStruct1, $tStruct2, 8) & @CRLF)