[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-maito@reactos.org>
This commit is contained in:
Elliot Killick 2023-12-23 16:13:47 -05:00 committed by GitHub
parent fcaa38c705
commit 932aef40f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

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

View file

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

View file

@ -119,7 +119,7 @@ NTSTATUS
NTAPI
LdrUnlockLoaderLock(
_In_ ULONG Flags,
_In_opt_ ULONG Cookie
_In_opt_ ULONG_PTR Cookie
);
BOOLEAN