RtlEqualMemory routine

The RtlEqualMemory routine compares two blocks of memory to determine whether the specified number of bytes are identical.

Syntax


LOGICAL RtlEqualMemory(
  _In_ const VOID   *Source1,
  _In_ const VOID   *Source2,
  _In_       SIZE_T Length
);

Parameters

Source1 [in]

Pointer to a caller-allocated block of memory to compare.

Source2 [in]

Pointer to a caller-allocated block of memory that is compared to the block of memory to which Source1 points.

Length [in]

Specifies the number of bytes to be compared.

Return value

RtlEqualMemory returns TRUE if Source1 and Source2 are equivalent; otherwise, it returns FALSE.

Remarks

RtlEqualMemory begins the comparison with byte zero of each block.

Callers of RtlEqualMemory can be running at any IRQL if both blocks of memory are resident.

Requirements

Target platform

Desktop

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

IRQL

Any level (See Remarks section)

See also

RtlCompareMemory

 

 

Send comments about this topic to Microsoft

Show: