Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

RtlCompareMemoryUlong routine

The RtlCompareMemoryUlong routine returns how many bytes in a block of memory match a specified pattern.

Syntax


SIZE_T RtlCompareMemoryUlong(
  _In_ PVOID  Source,
  _In_ SIZE_T Length,
  _In_ ULONG  Pattern
);

Parameters

Source [in]

Pointer to a block of memory. Must be aligned on a ULONG boundary.

Length [in]

Number of bytes over which the comparison should be done. Must be a multiple of sizeof(ULONG).

Pattern [in]

Pattern to be compared byte by byte, repeatedly, through the specified memory range.

Return value

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).

Remarks

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.

Requirements

Target platform

Universal

Header

Ntifs.h (include Ntifs.h)

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

IRQL

Any level (see Remarks section)

See also

RtlCompareMemory

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft