ntdll: Implement RtlGetLocaleFileMappingAddress().

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2022-03-21 11:52:22 +01:00
parent 4258f98244
commit c13d88ba97
3 changed files with 25 additions and 0 deletions

View File

@ -701,6 +701,29 @@ void WINAPI RtlResetRtlTranslations( const NLSTABLEINFO *info )
}
/**************************************************************************
* RtlGetLocaleFileMappingAddress (NTDLL.@)
*/
NTSTATUS WINAPI RtlGetLocaleFileMappingAddress( void **ptr, LCID *lcid, LARGE_INTEGER *size )
{
static void *cached_ptr;
static LCID cached_lcid;
if (!cached_ptr)
{
void *addr;
NTSTATUS status = NtInitializeNlsFiles( &addr, &cached_lcid, size );
if (status) return status;
if (InterlockedCompareExchangePointer( &cached_ptr, addr, NULL ))
NtUnmapViewOfSection( GetCurrentProcess(), addr );
}
*ptr = cached_ptr;
*lcid = cached_lcid;
return STATUS_SUCCESS;
}
/**************************************************************************
* RtlAnsiCharToUnicodeChar (NTDLL.@)
*/

View File

@ -726,6 +726,7 @@
# @ stub RtlGetLengthWithoutLastFullDosOrNtPathElement
# Yes, Microsoft really misspelled this one!
# @ stub RtlGetLengthWithoutTrailingPathSeperators
@ stdcall RtlGetLocaleFileMappingAddress(ptr ptr ptr)
@ stdcall RtlGetLongestNtPathLength()
@ stdcall -syscall -arch=win32 RtlGetNativeSystemInformation(long ptr long ptr) NtWow64GetNativeSystemInformation
@ stdcall -syscall -arch=win64 RtlGetNativeSystemInformation(long ptr long ptr) NtQuerySystemInformation

View File

@ -4346,6 +4346,7 @@ NTSYSAPI ULONG WINAPI RtlGetFullPathName_U(PCWSTR,ULONG,PWSTR,PWSTR*);
NTSYSAPI NTSTATUS WINAPI RtlGetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
NTSYSAPI NTSTATUS WINAPI RtlGetLastNtStatus(void);
NTSYSAPI DWORD WINAPI RtlGetLastWin32Error(void);
NTSYSAPI NTSTATUS WINAPI RtlGetLocaleFileMappingAddress(void**,LCID*,LARGE_INTEGER*);
NTSYSAPI DWORD WINAPI RtlGetLongestNtPathLength(void);
NTSYSAPI ULONG WINAPI RtlGetNtGlobalFlags(void);
NTSYSAPI BOOLEAN WINAPI RtlGetNtProductType(LPDWORD);