ReactOS 0.4.17-dev-1281-g065abb3
MultiByteToWideChar.c
Go to the documentation of this file.
1//
2// MultiByteToWideChar.c
3//
4// Copyright (c) 2024 Timo Kreuzer
5//
6// Definition of __acrt_MultiByteToWideChar.
7//
8// SPDX-License-Identifier: MIT
9//
10
11#include <windows.h>
12//#include <stringapiset.h>
13
14//
15// For flags documentation, see https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar
16//
17_Success_(return != 0)
18int
20__acrt_MultiByteToWideChar (
27{
28 /* For UTF-8 and CP 54936 only MB_ERR_INVALID_CHARS is allowed */
29 if ((_CodePage == CP_UTF8) || (_CodePage == 54936))
30 {
32 }
33
34 /* The following code pages require _DWFlags to be 0 */
35 else if ((_CodePage == 50220) || (_CodePage == 50221) || (_CodePage == 50222) ||
36 (_CodePage == 50225) || (_CodePage == 50227) || (_CodePage == 50229) ||
37 ((_CodePage >= 57002) && (_CodePage <= 57011)) ||
39 {
40 _DWFlags = 0;
41 }
42
49}
_In_ DWORD _In_ LPCSTR _In_ int _In_ int _CchWideChar
_In_ DWORD _In_ LPCWSTR _LpWideCharStr
_In_ DWORD _In_ int _Out_ LPWORD _In_ int _CodePage
_In_ DWORD _DWFlags
_In_ DWORD _In_ LPCSTR _In_ int _CbMultiByte
_In_ DWORD _In_ LPCSTR _LpMultiByteStr
#define MultiByteToWideChar
Definition: compat.h:110
#define __cdecl
Definition: corecrt.h:121
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned int UINT
Definition: sysinfo.c:13
#define MB_ERR_INVALID_CHARS
Definition: unicode.h:41
#define _Success_(c)
Definition: no_sal2.h:84
#define _Out_writes_opt_(s)
Definition: no_sal2.h:226
#define _In_
Definition: no_sal2.h:158
#define CP_UTF8
Definition: nls.h:20
const char * LPCSTR
Definition: typedefs.h:52
uint16_t * LPWSTR
Definition: typedefs.h:56
#define CP_SYMBOL
Definition: winnls.h:262
#define CP_UTF7
Definition: winnls.h:263