Index: base/applications/network/wlanconf/wlanconf.c =================================================================== --- base/applications/network/wlanconf/wlanconf.c (revision 70115) +++ base/applications/network/wlanconf/wlanconf.c (working copy) @@ -35,13 +35,19 @@ the command prompt. */ VOID PrintResourceString(INT resID, ...) { - WCHAR szMsgBuf[MAX_BUFFER_SIZE]; - va_list arg_ptr; + WCHAR bufSrc[MAX_BUFFER_SIZE]; + WCHAR bufFormatted[MAX_BUFFER_SIZE]; + CHAR bufFormattedOem[MAX_BUFFER_SIZE]; - va_start(arg_ptr, resID); - LoadStringW(GetModuleHandle(NULL), resID, szMsgBuf, MAX_BUFFER_SIZE); - vwprintf(szMsgBuf, arg_ptr); - va_end(arg_ptr); + va_list args; + va_start(args, resID); + + LoadStringW(GetModuleHandleW(NULL), resID, bufSrc, MAX_BUFFER_SIZE); + vswprintf(bufFormatted, bufSrc, args); + CharToOemW(bufFormatted, bufFormattedOem); + fputs(bufFormattedOem, stdout); + + va_end(args); } DWORD DoFormatMessage(DWORD ErrorCode) Index: base/applications/shutdown/shutdown.c =================================================================== --- base/applications/shutdown/shutdown.c (revision 70115) +++ base/applications/shutdown/shutdown.c (working copy) @@ -10,6 +10,7 @@ #include #include #include +#include /* * This takes strings from a resource stringtable @@ -17,13 +18,19 @@ */ VOID PrintResourceString(INT resID, ...) { - WCHAR tmpBuffer[MAX_BUFFER_SIZE]; - va_list arg_ptr; + WCHAR bufSrc[MAX_BUFFER_SIZE]; + WCHAR bufFormatted[MAX_BUFFER_SIZE]; + CHAR bufFormattedOem[MAX_BUFFER_SIZE]; - va_start(arg_ptr, resID); - LoadStringW(GetModuleHandle(NULL), resID, tmpBuffer, MAX_BUFFER_SIZE); - vfwprintf(stdout, tmpBuffer, arg_ptr); - va_end(arg_ptr); + va_list args; + va_start(args, resID); + + LoadStringW(GetModuleHandleW(NULL), resID, bufSrc, MAX_BUFFER_SIZE); + vswprintf(bufFormatted, bufSrc, args); + CharToOemW(bufFormatted, bufFormattedOem); + fputs(bufFormattedOem, stdout); + + va_end(args); } /* Index: base/system/diskpart/diskpart.c =================================================================== --- base/system/diskpart/diskpart.c (revision 70115) +++ base/system/diskpart/diskpart.c (working copy) @@ -16,18 +16,26 @@ #include #include +#define MAX_BUFFER_SIZE 3072 + /* FUNCTIONS ******************************************************************/ VOID PrintResourceString(INT resID, ...) { - WCHAR szMsg[3072]; - va_list arg_ptr; + WCHAR bufSrc[MAX_BUFFER_SIZE]; + WCHAR bufFormatted[MAX_BUFFER_SIZE]; + CHAR bufFormattedOem[MAX_BUFFER_SIZE]; - va_start(arg_ptr, resID); - LoadStringW(GetModuleHandle(NULL), resID, szMsg, 3072); - vwprintf(szMsg, arg_ptr); - va_end(arg_ptr); + va_list args; + va_start(args, resID); + + LoadStringW(GetModuleHandleW(NULL), resID, bufSrc, MAX_BUFFER_SIZE); + vswprintf(bufFormatted, bufSrc, args); + CharToOemW(bufFormatted, bufFormattedOem); + fputs(bufFormattedOem, stdout); + + va_end(args); } VOID