Skip to content

Commit 49da1cd

Browse files
committed
[NTDLL] Fix some vista exports
Make sure RtlRemovePrivileges gets compiled, when DLL_EXPORT_VERSION is 0x600+ Enable all existing functions from rtl_vista. Hack CsrNewThread export to exist on later versions, too
1 parent 55e0cab commit 49da1cd

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

dll/ntdll/def/ntdll.spec

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
@ stdcall CsrFreeCaptureBuffer(ptr)
3939
@ stdcall CsrGetProcessId()
4040
@ stdcall CsrIdentifyAlertableThread()
41-
@ stdcall -version=0x502 CsrNewThread()
41+
@ stdcall -version=0x502+ CsrNewThread() # Should be only 0x502, but we need it for now
4242
@ stdcall -version=0x502 CsrProbeForRead(ptr long long)
4343
@ stdcall -version=0x502 CsrProbeForWrite(ptr long long)
4444
@ stdcall CsrSetPriorityClass(ptr ptr)
@@ -607,8 +607,8 @@
607607
@ stdcall RtlAcquirePrivilege(ptr long long ptr)
608608
@ stdcall RtlAcquireResourceExclusive(ptr long)
609609
@ stdcall RtlAcquireResourceShared(ptr long)
610-
@ stdcall -stub -version=0x600+ RtlAcquireSRWLockExclusive(ptr)
611-
@ stdcall -stub -version=0x600+ RtlAcquireSRWLockShared(ptr)
610+
@ stdcall -version=0x600+ RtlAcquireSRWLockExclusive(ptr)
611+
@ stdcall -version=0x600+ RtlAcquireSRWLockShared(ptr)
612612
@ stdcall RtlActivateActivationContext(long ptr ptr)
613613
@ stdcall RtlActivateActivationContextEx(long ptr ptr ptr)
614614
@ stdcall -arch=x86_64,arm RtlActivateActivationContextUnsafeFast(ptr ptr)
@@ -936,7 +936,7 @@
936936
@ stdcall RtlInitUnicodeStringEx(ptr wstr)
937937
@ stdcall -stub RtlInitializeAtomPackage(ptr)
938938
@ stdcall RtlInitializeBitMap(ptr long long)
939-
@ stdcall -stub -version=0x600+ RtlInitializeConditionVariable(ptr)
939+
@ stdcall -version=0x600+ RtlInitializeConditionVariable(ptr)
940940
@ stdcall RtlInitializeContext(ptr ptr ptr ptr ptr)
941941
@ stdcall RtlInitializeCriticalSection(ptr)
942942
@ stdcall RtlInitializeCriticalSectionAndSpinCount(ptr long)
@@ -949,7 +949,7 @@
949949
@ stdcall RtlInitializeRXact(ptr long ptr)
950950
@ stdcall RtlInitializeResource(ptr)
951951
@ stdcall RtlInitializeSListHead(ptr)
952-
@ stdcall -stub -version=0x600+ RtlInitializeSRWLock(ptr)
952+
@ stdcall -version=0x600+ RtlInitializeSRWLock(ptr)
953953
@ stdcall RtlInitializeSid(ptr ptr long)
954954
@ stdcall RtlInsertElementGenericTable(ptr ptr long ptr)
955955
@ stdcall RtlInsertElementGenericTableAvl(ptr ptr long ptr)
@@ -1108,8 +1108,8 @@
11081108
@ stdcall RtlReleasePrivilege(ptr)
11091109
@ stdcall RtlReleaseRelativeName(ptr)
11101110
@ stdcall RtlReleaseResource(ptr)
1111-
@ stdcall -stub -version=0x600+ RtlReleaseSRWLockExclusive(ptr)
1112-
@ stdcall -stub -version=0x600+ RtlReleaseSRWLockShared(ptr)
1111+
@ stdcall -version=0x600+ RtlReleaseSRWLockExclusive(ptr)
1112+
@ stdcall -version=0x600+ RtlReleaseSRWLockShared(ptr)
11131113
@ stdcall RtlRemoteCall(ptr ptr ptr long ptr long long)
11141114
@ stdcall -version=0x600+ RtlRemovePrivileges(ptr ptr long)
11151115
@ stdcall RtlRemoveVectoredContinueHandler(ptr)
@@ -1124,10 +1124,10 @@
11241124
@ stdcall RtlRevertMemoryStream(ptr)
11251125
@ stdcall RtlRunDecodeUnicodeString(long ptr)
11261126
@ stdcall RtlRunEncodeUnicodeString(long ptr)
1127-
@ stdcall -stub -version=0x600+ RtlRunOnceBeginInitialize(ptr long ptr)
1128-
@ stdcall -stub -version=0x600+ RtlRunOnceComplete(ptr long ptr)
1129-
@ stdcall -stub -version=0x600+ RtlRunOnceExecuteOnce(ptr ptr ptr ptr)
1130-
@ stdcall -stub -version=0x600+ RtlRunOnceInitialize(ptr)
1127+
@ stdcall -version=0x600+ RtlRunOnceBeginInitialize(ptr long ptr)
1128+
@ stdcall -version=0x600+ RtlRunOnceComplete(ptr long ptr)
1129+
@ stdcall -version=0x600+ RtlRunOnceExecuteOnce(ptr ptr ptr ptr)
1130+
@ stdcall -version=0x600+ RtlRunOnceInitialize(ptr)
11311131
@ stdcall RtlSecondsSince1970ToTime(long ptr)
11321132
@ stdcall RtlSecondsSince1980ToTime(long ptr)
11331133
@ stdcall RtlSeekMemoryStream(ptr int64 long ptr)
@@ -1177,8 +1177,8 @@
11771177
@ stub -version=0x600+ RtlSidHashLookup
11781178
@ stub -version=0x600+ RtlSidIsHigherLevel
11791179
@ stdcall RtlSizeHeap(long long ptr)
1180-
@ stdcall -stub -version=0x600+ RtlSleepConditionVariableCS(ptr ptr ptr)
1181-
@ stdcall -stub -version=0x600+ RtlSleepConditionVariableSRW(ptr ptr ptr long)
1180+
@ stdcall -version=0x600+ RtlSleepConditionVariableCS(ptr ptr ptr)
1181+
@ stdcall -version=0x600+ RtlSleepConditionVariableSRW(ptr ptr ptr long)
11821182
@ stdcall RtlSplay(ptr)
11831183
@ stdcall RtlStartRXact(ptr)
11841184
@ stdcall RtlStatMemoryStream(ptr ptr long)
@@ -1250,8 +1250,8 @@
12501250
@ stdcall RtlValidateUnicodeString(long ptr)
12511251
@ stdcall RtlVerifyVersionInfo(ptr long double)
12521252
@ stdcall -arch=x86_64 RtlVirtualUnwind(long long long ptr ptr ptr ptr ptr)
1253-
@ stdcall -stub -version=0x600+ RtlWakeAllConditionVariable(ptr)
1254-
@ stdcall -stub -version=0x600+ RtlWakeConditionVariable(ptr)
1253+
@ stdcall -version=0x600+ RtlWakeAllConditionVariable(ptr)
1254+
@ stdcall -version=0x600+ RtlWakeConditionVariable(ptr)
12551255
@ stdcall RtlWalkFrameChain(ptr long long)
12561256
@ stdcall RtlWalkHeap(long ptr)
12571257
@ stub -version=0x600+ RtlWerpReportException

sdk/lib/rtl/priv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ RtlAdjustPrivilege(IN ULONG Privilege,
487487
return STATUS_SUCCESS;
488488
}
489489

490-
#if (NTDDI_VERSION >= NTDDI_VISTA)
490+
#if (NTDDI_VERSION >= NTDDI_VISTA) || (DLL_EXPORT_VERSION >= _WIN32_WINNT_VISTA)
491491

492492
/**
493493
* @brief

0 commit comments

Comments
 (0)