[NTDLL:LDR] Little fixes about SAL annotation and behavior (#5793)

- Uniform function declarations in .c and .h with fixes and SAL2 improvements.
- Use LDR_[UN]LOCK_LOADER_LOCK_FLAG_XXX correctly.
- Fix incorrect UsedSize calculation in LdrQueryProcessModuleInformationEx (caught by ThFabba).
- Whatever the callback request stop the enumeration or not in LdrEnumerateLoadedModules, the following operations should be the same.
- Fix 2 incorrect DPRINT1 that printed incorrect parameter.
- Return error if RtlAllocateHeap failed in LdrpGetProcedureAddress, and add comments about NT6.2 new changes.
This commit is contained in:
Ratin Gao 2023-11-16 03:59:32 +08:00 committed by GitHub
parent bd9e2d6beb
commit bd0a5498b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 120 additions and 103 deletions

View file

@ -3975,13 +3975,12 @@ RtlImageRvaToSection(
_In_ ULONG Rva
);
NTSYSAPI
ULONG
NTAPI
LdrRelocateImageWithBias(
_In_ PVOID NewAddress,
_In_ PVOID BaseAddress,
_In_ LONGLONG AdditionalBias,
_In_ PCCH LoaderName,
_In_opt_ PCSTR LoaderName,
_In_ ULONG Success,
_In_ ULONG Conflict,
_In_ ULONG Invalid