- Add SetConsoleCP api to the usetup, and make it call blue.sys in order to load...
[reactos.git] / reactos / base / setup / usetup / native / utils / console.c
index f3b6d65..f87a176 100644 (file)
@@ -484,4 +484,29 @@ SetConsoleTextAttribute(
        return NT_SUCCESS(Status);
 }
 
+BOOL WINAPI
+SetConsoleOutputCP(
+       IN UINT wCodepage)
+{
+       HANDLE hConsoleOutput;
+       IO_STATUS_BLOCK IoStatusBlock;
+       NTSTATUS Status;
+
+       hConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
+
+       Status = NtDeviceIoControlFile(
+               hConsoleOutput,
+               NULL,
+               NULL,
+               NULL,
+               &IoStatusBlock,
+               IOCTL_CONSOLE_LOADFONT,
+               &wCodepage,
+               sizeof(ULONG),
+               NULL,
+               0);
+       return NT_SUCCESS(Status);
+}
+
+
 /* EOF */