[CACLS][CLIP][COMP][HELP][LOGOFF][SHUTDOWN][CHKDSK][FORMAT][SUBST]
[reactos.git] / reactos / base / applications / cmdutils / help / help.c
index 012b5a6..3937fa5 100644 (file)
 #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;
@@ -73,6 +57,9 @@ int wmain(int argc, WCHAR* argv[])
 {
     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.
@@ -108,7 +95,7 @@ int wmain(int argc, WCHAR* argv[])
      * Run "<command> /?" in the current command processor.
      */
     StringCbPrintfW(CmdLine, sizeof(CmdLine), L"%ls /?", argv[1]);
-    
+
     _flushall();
     return _wsystem(CmdLine);
 }