https://git.reactos.org/?p=reactos.git;a=commitdiff;h=932aef40f76664e30aaaa462a163ab873eb3e91b
commit 932aef40f76664e30aaaa462a163ab873eb3e91b Author: Elliot Killick <cont...@elliotkillick.com> AuthorDate: Sat Dec 23 16:13:47 2023 -0500 Commit: GitHub <nore...@github.com> CommitDate: Sat Dec 23 22:13:47 2023 +0100 [LDR][NDK] Fix inconsistent Cookie type (#6188) Make LdrUnlockLoaderLock Cookie type consistent with LdrLockLoaderLock and LdrpMakeCookie functions. In addition: * Adjustment of the formatting string for ULONG_PTR; * ntdll.spec: specify ptr for 2nd parameter of LdrUnlockLoaderLock: This is a parameter whose length is pointer-like, platform-dependent. Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-ma...@reactos.org> --- dll/ntdll/def/ntdll.spec | 2 +- dll/ntdll/ldr/ldrapi.c | 4 ++-- sdk/include/ndk/ldrfuncs.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dll/ntdll/def/ntdll.spec b/dll/ntdll/def/ntdll.spec index 0dec2c84c88..d4ad13d38bc 100644 --- a/dll/ntdll/def/ntdll.spec +++ b/dll/ntdll/def/ntdll.spec @@ -184,7 +184,7 @@ @ stdcall LdrUnloadAlternateResourceModule(ptr) @ stub -version=0x600+ LdrUnloadAlternateResourceModuleEx @ stdcall LdrUnloadDll(ptr) -@ stdcall LdrUnlockLoaderLock(long long) +@ stdcall LdrUnlockLoaderLock(long ptr) @ stdcall -stub -version=0x600+ LdrUnregisterDllNotification(ptr) @ stdcall LdrVerifyImageMatchesChecksum(ptr long long long) @ stdcall -stub -version=0x600+ LdrVerifyImageMatchesChecksumEx(ptr ptr) diff --git a/dll/ntdll/ldr/ldrapi.c b/dll/ntdll/ldr/ldrapi.c index 34517b1a251..8ef6dc25903 100644 --- a/dll/ntdll/ldr/ldrapi.c +++ b/dll/ntdll/ldr/ldrapi.c @@ -100,11 +100,11 @@ NTSTATUS NTAPI LdrUnlockLoaderLock( _In_ ULONG Flags, - _In_opt_ ULONG Cookie) + _In_opt_ ULONG_PTR Cookie) { NTSTATUS Status = STATUS_SUCCESS; - DPRINT("LdrUnlockLoaderLock(%x %x)\n", Flags, Cookie); + DPRINT("LdrUnlockLoaderLock(%x %Ix)\n", Flags, Cookie); /* Check for valid flags */ if (Flags & ~LDR_UNLOCK_LOADER_LOCK_FLAG_RAISE_ON_ERRORS) diff --git a/sdk/include/ndk/ldrfuncs.h b/sdk/include/ndk/ldrfuncs.h index 9b58e9d5f20..62e334aacf7 100644 --- a/sdk/include/ndk/ldrfuncs.h +++ b/sdk/include/ndk/ldrfuncs.h @@ -119,7 +119,7 @@ NTSTATUS NTAPI LdrUnlockLoaderLock( _In_ ULONG Flags, - _In_opt_ ULONG Cookie + _In_opt_ ULONG_PTR Cookie ); BOOLEAN