Author: hbelusca
Date: Tue Jul 29 15:54:03 2014
New Revision: 63770
URL:
http://svn.reactos.org/svn/reactos?rev=63770&view=rev
Log:
[CONSRV]
Fix returned number of read/write codes.
Modified:
branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/text.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/conoutput.c
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/text.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/text.c [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/text.c [iso-8859-1] Tue
Jul 29 15:54:03 2014
@@ -1117,7 +1117,7 @@
Cleanup:
if (tmpString) RtlFreeHeap(RtlGetProcessHeap(), 0, tmpString);
- // if (NumCodesWritten) *NumCodesWritten = Written;
+ if (NumCodesWritten) *NumCodesWritten = NumCodesToWrite; // Written;
return Status;
}
@@ -1194,7 +1194,7 @@
TermDrawRegion(Console, &UpdateRect);
}
- // if (NumCodesWritten) *NumCodesWritten = Written; // NumCodesToWrite;
+ if (NumCodesWritten) *NumCodesWritten = NumCodesToWrite; // Written;
return STATUS_SUCCESS;
}
@@ -1329,7 +1329,11 @@
CapturedDestinationOrigin.X + ConioRectWidth(&SrcRegion ) - 1);
if (!Unicode)
- ConsoleAnsiCharToUnicodeChar(Console, &FillChar.Char.UnicodeChar,
&FillChar.Char.AsciiChar);
+ {
+ WCHAR tmp;
+ ConsoleAnsiCharToUnicodeChar(Console, &tmp, &FillChar.Char.AsciiChar);
+ FillChar.Char.UnicodeChar = tmp;
+ }
ConioMoveRegion(Buffer, &SrcRegion, &DstRegion, &CapturedClipRectangle,
FillChar);
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/conoutput.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/conoutput.c [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/conoutput.c [iso-8859-1] Tue
Jul 29 15:54:03 2014
@@ -586,7 +586,11 @@
Status =
ConSrvGetTextModeBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
ReadOutputCodeRequest->OutputHandle,
&Buffer, GENERIC_READ, TRUE);
- if (!NT_SUCCESS(Status)) return Status;
+ if (!NT_SUCCESS(Status))
+ {
+ ReadOutputCodeRequest->NumCodes = 0;
+ return Status;
+ }
Status = ConDrvReadConsoleOutputString(Buffer->Header.Console,
Buffer,
@@ -670,7 +674,11 @@
Status =
ConSrvGetTextModeBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
WriteOutputCodeRequest->OutputHandle,
&Buffer, GENERIC_WRITE, TRUE);
- if (!NT_SUCCESS(Status)) return Status;
+ if (!NT_SUCCESS(Status))
+ {
+ WriteOutputCodeRequest->NumCodes = 0;
+ return Status;
+ }
Status = ConDrvWriteConsoleOutputString(Buffer->Header.Console,
Buffer,
@@ -712,7 +720,11 @@
Status =
ConSrvGetTextModeBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
FillOutputRequest->OutputHandle,
&Buffer, GENERIC_WRITE, TRUE);
- if (!NT_SUCCESS(Status)) return Status;
+ if (!NT_SUCCESS(Status))
+ {
+ FillOutputRequest->NumCodes = 0;
+ return Status;
+ }
Status = ConDrvFillConsoleOutput(Buffer->Header.Console,
Buffer,