Skip to content

Commit 776c660

Browse files
committed
[NTDLL] Export RTL locale functions
The exports are NT6, but the table is initialized unconditionally, because the functions will be used later internally.
1 parent e01c32f commit 776c660

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

dll/ntdll/def/ntdll.spec

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@
695695
@ stdcall -stub -version=0x600+ RtlConnectToSm(ptr ptr long ptr)
696696
@ stdcall RtlConsoleMultiByteToUnicodeN(ptr long ptr ptr long ptr)
697697
@ stdcall RtlConvertExclusiveToShared(ptr)
698-
@ stdcall -stub -version=0x600+ RtlConvertLCIDToString(long long long ptr long)
698+
@ stdcall -version=0x600+ RtlConvertLCIDToString(long long long ptr long)
699699
@ stdcall -arch=win32 -ret64 RtlConvertLongToLargeInteger(long)
700700
@ stdcall RtlConvertSharedToExclusive(ptr)
701701
@ stdcall RtlConvertSidToUnicodeString(ptr ptr long)
@@ -741,7 +741,7 @@
741741
@ stdcall RtlCreateUserSecurityObject(ptr long ptr ptr long ptr ptr)
742742
@ stdcall -stub -version=0x600+ RtlCreateUserStack(long long long long long ptr)
743743
@ stdcall RtlCreateUserThread(long ptr long ptr long long ptr ptr ptr ptr)
744-
@ stdcall -stub -version=0x600+ RtlCultureNameToLCID(ptr ptr)
744+
@ stdcall -version=0x600+ RtlCultureNameToLCID(ptr ptr)
745745
@ stdcall RtlCustomCPToUnicodeN(ptr wstr long ptr str long)
746746
@ stdcall RtlCutoverTimeToSystemTime(ptr ptr ptr long)
747747
@ stdcall -stub -version=0x600+ RtlDeCommitDebugInfo(long long long) ; doesn't exist in win11
@@ -999,8 +999,8 @@
999999
@ stdcall RtlIsThreadWithinLoaderCallout()
10001000
@ stdcall RtlIsValidHandle(ptr ptr)
10011001
@ stdcall RtlIsValidIndexHandle(ptr long ptr)
1002-
@ stdcall -stub -version=0x600+ RtlIsValidLocaleName(ptr long)
1003-
@ stdcall -stub -version=0x600+ RtlLCIDToCultureName(long long)
1002+
@ stdcall -version=0x600+ RtlIsValidLocaleName(wstr long)
1003+
@ stdcall -version=0x600+ RtlLCIDToCultureName(long ptr)
10041004
@ stdcall -arch=win32 -ret64 RtlLargeIntegerAdd(double double)
10051005
@ stdcall -arch=win32 -ret64 RtlLargeIntegerArithmeticShift(double long)
10061006
@ stdcall -arch=win32 -ret64 RtlLargeIntegerDivide(double double ptr)
@@ -1009,13 +1009,13 @@
10091009
@ stdcall -arch=win32 -ret64 RtlLargeIntegerShiftRight(double long)
10101010
@ stdcall -arch=win32 -ret64 RtlLargeIntegerSubtract(double double)
10111011
@ stdcall RtlLargeIntegerToChar(ptr long long ptr)
1012-
@ stdcall -stub -version=0x600+ RtlLcidToLocaleName(long long long long)
1012+
@ stdcall -version=0x600+ RtlLcidToLocaleName(long ptr long long)
10131013
@ stdcall RtlLeaveCriticalSection(ptr)
10141014
@ stdcall RtlLengthRequiredSid(long)
10151015
@ stdcall RtlLengthSecurityDescriptor(ptr)
10161016
@ stdcall RtlLengthSid(ptr)
10171017
@ stdcall RtlLocalTimeToSystemTime(ptr ptr)
1018-
@ stdcall -stub -version=0x600+ RtlLocaleNameToLcid(wstr ptr long)
1018+
@ stdcall -version=0x600+ RtlLocaleNameToLcid(wstr ptr long)
10191019
@ stdcall RtlLockBootStatusData(ptr)
10201020
@ stdcall -stub -version=0x600+ RtlLockCurrentThread()
10211021
@ stdcall RtlLockHeap(long)

dll/ntdll/ldr/ldrinit.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ ULONG LdrpActiveUnloadCount;
8686
VOID NTAPI RtlpInitializeVectoredExceptionHandling(VOID);
8787
VOID NTAPI RtlpInitDeferredCriticalSection(VOID);
8888
VOID NTAPI RtlInitializeHeapManager(VOID);
89+
NTSTATUS NTAPI RtlpInitializeLocaleTable(VOID);
8990

9091
ULONG RtlpDisableHeapLookaside; // TODO: Move to heap.c
9192
ULONG RtlpShutdownProcessFlags; // TODO: Use it
@@ -2031,6 +2032,13 @@ LdrpInitializeProcess(IN PCONTEXT Context,
20312032
return STATUS_NO_MEMORY;
20322033
}
20332034

2035+
Status = RtlpInitializeLocaleTable();
2036+
if (!NT_SUCCESS(Status))
2037+
{
2038+
DPRINT1("Failed to initialize locale table\n");
2039+
return Status;
2040+
}
2041+
20342042
/* Allocate an Activation Context Stack */
20352043
Status = RtlAllocateActivationContextStack(&Teb->ActivationContextStackPointer);
20362044
if (!NT_SUCCESS(Status)) return Status;

0 commit comments

Comments
 (0)