mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 19:41:45 +00:00
[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:
parent
bd9e2d6beb
commit
bd0a5498b0
9 changed files with 120 additions and 103 deletions
|
@ -460,11 +460,11 @@ LdrProcessRelocationBlockLongLong(
|
|||
ULONG
|
||||
NTAPI
|
||||
LdrRelocateImage(
|
||||
IN PVOID BaseAddress,
|
||||
IN PCCH LoaderName,
|
||||
IN ULONG Success,
|
||||
IN ULONG Conflict,
|
||||
IN ULONG Invalid)
|
||||
_In_ PVOID BaseAddress,
|
||||
_In_opt_ PCSTR LoaderName,
|
||||
_In_ ULONG Success,
|
||||
_In_ ULONG Conflict,
|
||||
_In_ ULONG Invalid)
|
||||
{
|
||||
return LdrRelocateImageWithBias(BaseAddress, 0, LoaderName, Success, Conflict, Invalid);
|
||||
}
|
||||
|
@ -472,12 +472,12 @@ LdrRelocateImage(
|
|||
ULONG
|
||||
NTAPI
|
||||
LdrRelocateImageWithBias(
|
||||
IN PVOID BaseAddress,
|
||||
IN LONGLONG AdditionalBias,
|
||||
IN PCCH LoaderName,
|
||||
IN ULONG Success,
|
||||
IN ULONG Conflict,
|
||||
IN ULONG Invalid)
|
||||
_In_ PVOID BaseAddress,
|
||||
_In_ LONGLONG AdditionalBias,
|
||||
_In_opt_ PCSTR LoaderName,
|
||||
_In_ ULONG Success,
|
||||
_In_ ULONG Conflict,
|
||||
_In_ ULONG Invalid)
|
||||
{
|
||||
PIMAGE_NT_HEADERS NtHeaders;
|
||||
PIMAGE_DATA_DIRECTORY RelocationDDir;
|
||||
|
@ -487,6 +487,8 @@ LdrRelocateImageWithBias(
|
|||
PUSHORT TypeOffset;
|
||||
LONGLONG Delta;
|
||||
|
||||
UNREFERENCED_PARAMETER(LoaderName);
|
||||
|
||||
NtHeaders = RtlImageNtHeader(BaseAddress);
|
||||
|
||||
if (NtHeaders == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue