ReactOS 0.4.16-dev-1983-g1a17364
toupper_nt_mb.c File Reference
#include <windef.h>
#include <ndk/rtlfuncs.h>
Include dependency graph for toupper_nt_mb.c:

Go to the source code of this file.

Macros

#define WIN32_NO_STATUS
 

Functions

_Check_return_ int __cdecl toupper_nt_mb (_In_ int _C)
 

Macro Definition Documentation

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 8 of file toupper_nt_mb.c.

Function Documentation

◆ toupper_nt_mb()

_Check_return_ int __cdecl toupper_nt_mb ( _In_ int  _C)

Definition at line 15 of file toupper_nt_mb.c.

16{
17 PUCHAR ptr;
18 WCHAR wc, wcUpper;
19 CHAR chrUpper[2];
20 ULONG mbSize;
21
22 ptr = (PUCHAR)&_C;
24 wcUpper = RtlUpcaseUnicodeChar(wc);
25 RtlUnicodeToMultiByteN(chrUpper, 2, &mbSize, &wcUpper, sizeof(WCHAR));
26
27 if (mbSize == 2)
28 return (UCHAR)chrUpper[1] + ((UCHAR)chrUpper[0] << 8);
29 else if (mbSize == 1)
30 return (UCHAR)chrUpper[0];
31 else
32 return (WCHAR)_C;
33}
NTSYSAPI WCHAR WINAPI RtlAnsiCharToUnicodeChar(LPSTR *)
static PVOID ptr
Definition: dispmode.c:27
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToMultiByteN(_Out_ PCHAR MbString, _In_ ULONG MbSize, _Out_opt_ PULONG ResultSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
Definition: nlsboot.c:107
WCHAR NTAPI RtlUpcaseUnicodeChar(_In_ WCHAR Source)
Definition: nlsboot.c:176
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
unsigned char UCHAR
Definition: xmlstorage.h:181
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175