The RtlCompareMemoryUlong routine returns how many bytes in a block of memory match a specified pattern.
NTSYSAPI SIZE_T RtlCompareMemoryUlong( PVOID Source, SIZE_T Length, ULONG Pattern );
Pointer to a block of memory. Must be aligned on a ULONG boundary.
Number of bytes over which the comparison should be done. Must be a multiple of sizeof(ULONG).
Pattern to be compared byte by byte, repeatedly, through the specified memory range.
RtlCompareMemoryUlong returns the number of bytes that were compared and found to be equal. If all bytes compare as equal, the input Length is returned. RtlCompareMemoryUlong returns zero if Source is not ULONG-aligned or if Length is not a multiple of sizeof(ULONG).
If the block of memory at Source is nonpaged, the caller can be running at any IRQL. Otherwise, callers of RtlCompareMemoryUlong must be running at IRQL < DISPATCH_LEVEL.
For more information about managing buffered data and initializing driver-allocated buffers, see Buffered Data and Buffer Initialization.
|Header||ntifs.h (include Ntifs.h)|
|DLL||NtosKrnl.exe (kernel mode); Ntdll.dll (user mode)|
|IRQL||Any level (see Remarks section)|