ReactOS 0.4.16-dev-927-g467dec4
OutputDebugStringA.cpp File Reference
Include dependency graph for OutputDebugStringA.cpp:

Go to the source code of this file.

Functions

void WINAPI __acrt_OutputDebugStringA (LPCSTR const text)
 

Function Documentation

◆ __acrt_OutputDebugStringA()

void WINAPI __acrt_OutputDebugStringA ( LPCSTR const  text)

Definition at line 11 of file OutputDebugStringA.cpp.

14{
15 if (text == nullptr)
16 {
17 return;
18 }
19 size_t const text_size = strlen(text) + 1;
20 if (text_size == 0)
21 {
22 return;
23 }
24 // Use alloca instead of heap, since this code is executed during asserts
25 auto text_wide = (wchar_t*)_alloca(text_size * sizeof(wchar_t));
26 size_t converted;
27 if (mbstowcs_s(&converted, text_wide, text_size, text, text_size - 1) == 0)
28 {
29 OutputDebugStringW(text_wide);
30 }
31}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
const WCHAR * text
Definition: package.c:1794
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
errno_t mbstowcs_s(size_t *cchConverted, wchar_t *widechar, size_t charoutct, const char *multibyte, size_t count)
Definition: mbstowcs.cpp:316