Skip to content

Commit 9ab2b1b

Browse files
authored
[KERNEL32][NTDLL] Export TryAcquireSRWLockExclusive and TryAcquireSRWLockShared (reactos#8430)
CORE-20195 - Fix ntdll mistakenly being set to version 0x601 instead of 0x601+ - Add the stdcall to kernel32.spec which just reroutes to ntdll and seems to properly fix the 2 missing api calls.
1 parent 37574d1 commit 9ab2b1b

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

dll/ntdll/def/ntdll.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,8 +1207,8 @@
12071207
@ stdcall RtlTraceDatabaseUnlock(ptr)
12081208
@ stdcall RtlTraceDatabaseValidate(ptr)
12091209
@ stdcall -stub -version=0x600+ RtlTryAcquirePebLock()
1210-
@ stdcall -version=0x601 RtlTryAcquireSRWLockExclusive(ptr)
1211-
@ stdcall -version=0x601 RtlTryAcquireSRWLockShared(ptr)
1210+
@ stdcall -version=0x601+ RtlTryAcquireSRWLockExclusive(ptr)
1211+
@ stdcall -version=0x601+ RtlTryAcquireSRWLockShared(ptr)
12121212
@ stdcall RtlTryEnterCriticalSection(ptr)
12131213
@ stdcall RtlUnhandledExceptionFilter2(ptr long)
12141214
@ stdcall RtlUnhandledExceptionFilter(ptr)

dll/win32/kernel32/kernel32.spec

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
@ stdcall -version=0x600+ AcquireSRWLockExclusive(ptr) NTDLL.RtlAcquireSRWLockExclusive
2-
@ stdcall -version=0x600+ AcquireSRWLockShared(ptr) NTDLL.RtlAcquireSRWLockShared
1+
@ stdcall -version=0x600+ AcquireSRWLockExclusive(ptr) ntdll.RtlAcquireSRWLockExclusive
2+
@ stdcall -version=0x600+ AcquireSRWLockShared(ptr) ntdll.RtlAcquireSRWLockShared
33
@ stdcall ActivateActCtx(ptr ptr)
44
@ stdcall AddAtomA(str)
55
@ stdcall AddAtomW(wstr)
@@ -1156,6 +1156,8 @@
11561156
@ stdcall Toolhelp32ReadProcessMemory(long ptr ptr long ptr)
11571157
@ stdcall TransactNamedPipe(long ptr long ptr long ptr ptr)
11581158
@ stdcall TransmitCommChar(long long)
1159+
@ stdcall -version=0x601+ TryAcquireSRWLockExclusive(ptr) ntdll.RtlTryAcquireSRWLockExclusive
1160+
@ stdcall -version=0x601+ TryAcquireSRWLockShared(ptr) ntdll.RtlTryAcquireSRWLockShared
11591161
@ stdcall TryEnterCriticalSection(ptr) ntdll.RtlTryEnterCriticalSection
11601162
@ stub -version=0x600+ TrySubmitThreadpoolCallback
11611163
@ stdcall TzSpecificLocalTimeToSystemTime(ptr ptr ptr)

sdk/include/psdk/winbase.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,10 @@ BOOL WINAPI AccessCheckAndAuditAlarmW(LPCWSTR,LPVOID,LPWSTR,LPWSTR,PSECURITY_DES
12891289
VOID WINAPI AcquireSRWLockExclusive(PSRWLOCK);
12901290
VOID WINAPI AcquireSRWLockShared(PSRWLOCK);
12911291
#endif
1292+
#if (_WIN32_WINNT >= 0x0601)
1293+
BOOLEAN WINAPI TryAcquireSRWLockExclusive(PSRWLOCK);
1294+
BOOLEAN WINAPI TryAcquireSRWLockShared(PSRWLOCK);
1295+
#endif
12921296
#if (_WIN32_WINNT >= 0x0501)
12931297
BOOL WINAPI ActivateActCtx(_Inout_opt_ HANDLE, _Out_ ULONG_PTR*);
12941298
#endif

0 commit comments

Comments
 (0)