[UCRT:LOCALE] Implement __acrt_WideCharToMultiByte

This commit is contained in:
Timo Kreuzer 2024-12-02 13:47:49 +02:00
parent bd3c7654ec
commit d21fd37650
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,35 @@
//
// WideCharToMultiByte.c
//
// Copyright (c) 2024 Timo Kreuzer
//
// Definition of __acrt_WideCharToMultiByte.
//
// SPDX-License-Identifier: MIT
//
#include <windows.h>
//#include <stringapiset.h>
_Success_(return != 0)
int
__cdecl
__acrt_WideCharToMultiByte (
_In_ UINT _CodePage,
_In_ DWORD _DWFlags,
_In_ LPCWSTR _LpWideCharStr,
_In_ int _CchWideChar,
_Out_writes_opt_(_CbMultiByte) LPSTR _LpMultiByteStr,
_In_ int _CbMultiByte,
_In_opt_ LPCSTR _LpDefaultChar,
_Out_opt_ LPBOOL _LpUsedDefaultChar)
{
return WideCharToMultiByte(_CodePage,
_DWFlags,
_LpWideCharStr,
_CchWideChar,
_LpMultiByteStr,
_CbMultiByte,
_LpDefaultChar,
_LpUsedDefaultChar);
}

View file

@ -24,4 +24,5 @@ list(APPEND UCRT_LOCALE_SOURCES
locale/nlsdata.cpp
locale/setlocale.cpp
locale/wsetlocale.cpp
locale/WideCharToMultiByte.c
)