#define WIN32_NO_STATUS
#include <windef.h>
#include <winbase.h>
-#include <winuser.h>
-#include <wincon.h>
+
#include <strsafe.h>
+#include <conutils.h>
+
#include "help.h"
#include "resource.h"
-VOID PrintResourceString(INT resID, ...)
-{
- WCHAR bufSrc[RC_STRING_MAX_SIZE];
- WCHAR bufFormatted[RC_STRING_MAX_SIZE];
- CHAR bufFormattedOem[RC_STRING_MAX_SIZE];
-
- va_list args;
- va_start(args, resID);
-
- LoadStringW(GetModuleHandleW(NULL), resID, bufSrc, ARRAYSIZE(bufSrc));
- vswprintf(bufFormatted, bufSrc, args);
- CharToOemW(bufFormatted, bufFormattedOem);
- fputs(bufFormattedOem, stdout);
-
- va_end(args);
-}
-
BOOL IsInternalCommand(LPCWSTR Cmd)
{
size_t i;
{
WCHAR CmdLine[CMDLINE_LENGTH];
+ /* Initialize the Console Standard Streams */
+ ConInitStdStreams();
+
/*
* If the user hasn't asked for specific help,
* then print out the list of available commands.
* Run "<command> /?" in the current command processor.
*/
StringCbPrintfW(CmdLine, sizeof(CmdLine), L"%ls /?", argv[1]);
-
+
_flushall();
return _wsystem(CmdLine);
}