函数参考


_WinAPI_EqualMemory

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

#Include <WinAPIEx.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.
0 Otherwise.
失败: 返回 0 并设置 @error 标志为非 0 值.

注意/说明

None

相关

详情参考

在MSDN中搜索


示例/演示


#Include <WinAPIEx.au3>

Opt('MustDeclareVars', 1)

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

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

ConsoleWrite('Two structures are equivalent: ' & _WinAPI_EqualMemory(DllStructGetPtr($tStruct1), DllStructGetPtr($tStruct2), 8) & @CR)