The RtlCompareMemory routine compares two blocks of memory and returns the number of bytes that match until the first difference.
Syntax
NTSYSAPI SIZE_T RtlCompareMemory(
[in] const VOID *Source1,
[in] const VOID *Source2,
[in] SIZE_T Length
);
Parameters
[in] Source1
メモリの最初のブロックへのポインター。
[in] Source2
メモリの 2 番目のブロックへのポインター。
[in] Length
比較するバイト数。
Return value
RtlCompareMemory returns the number of bytes in the two blocks that match. If all bytes match up to the specified Length value, the Length value is returned.
Remarks
ルーチンは、最初のブロックの最初のバイトを 2 番目のブロックの最初のバイトと比較することから始まり、バイトが一致する間、2 つのブロック内の連続するバイトを比較し続けます。 The routine stops comparing bytes when it encounters the first pair of bytes that are not equal, or when the number of matching bytes equals the Length parameter value, whichever occurs first.
Callers of RtlCompareMemory can be running at any IRQL if both blocks of memory are resident.
Requirements
| Requirement | Value |
|---|---|
| Target Platform | Universal |
| Header | wdm.h (Wdm.h、Ntddk.h、Ntifs.h を含む) |
| Library | NtosKrnl.lib;Windows 10 の OneCoreUAP.lib |
| DLL | NtDll.dll (ユーザー モード);Kernel32.dll (ユーザー モード);NtosKrnl.exe (カーネル モード) |
| IRQL | 任意のレベル (「解説」セクションを参照) |
| DDI コンプライアンス規則 を する | BufAfterReqCompletedIntIoctlA(kmdf), BufAfterReqCompletedIoctlA(kmdf), BufAfterReqCompletedReadA(kmdf), BufAfterReqCompletedWriteA(kmdf) |