A few more console fixes

svn path=/trunk/; revision=1566
This commit is contained in:
Phillip Susi 2001-01-25 05:37:03 +00:00
parent a6a0f5ae18
commit 74e0c4a781

View file

@ -1,4 +1,4 @@
/* $Id: console.c,v 1.27 2001/01/24 05:10:38 phreak Exp $ /* $Id: console.c,v 1.28 2001/01/25 05:37:03 phreak Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -685,7 +685,7 @@ WriteConsoleOutputCharacterA(
Request = HeapAlloc(GetProcessHeap(), Request = HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY, HEAP_ZERO_MEMORY,
sizeof(CSRSS_API_REQUEST) + CSRSS_MAX_WRITE_CONSOLE_OUTPUT_CHAR); sizeof(CSRSS_WRITE_CONSOLE_OUTPUT_CHAR_REQUEST) + CSRSS_MAX_WRITE_CONSOLE_OUTPUT_CHAR);
if( !Request ) if( !Request )
{ {
SetLastError( ERROR_OUTOFMEMORY ); SetLastError( ERROR_OUTOFMEMORY );
@ -703,7 +703,7 @@ WriteConsoleOutputCharacterA(
memcpy( &Request->Data.WriteConsoleOutputCharRequest.String[0], memcpy( &Request->Data.WriteConsoleOutputCharRequest.String[0],
lpCharacter, lpCharacter,
Size ); Size );
Status = CsrClientCallServer( Request, &Reply, sizeof( CSRSS_API_REQUEST ), sizeof( CSRSS_API_REPLY ) ); Status = CsrClientCallServer( Request, &Reply, sizeof( CSRSS_WRITE_CONSOLE_OUTPUT_CHAR_REQUEST ) + Size, sizeof( CSRSS_API_REPLY ) );
if( !NT_SUCCESS( Status ) || !NT_SUCCESS( Status = Reply.Status ) ) if( !NT_SUCCESS( Status ) || !NT_SUCCESS( Status = Reply.Status ) )
{ {
SetLastErrorByStatus ( Status ); SetLastErrorByStatus ( Status );
@ -758,7 +758,7 @@ WriteConsoleOutputAttribute(
Request = HeapAlloc(GetProcessHeap(), Request = HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY, HEAP_ZERO_MEMORY,
sizeof(CSRSS_API_REQUEST) + CSRSS_MAX_WRITE_CONSOLE_OUTPUT_ATTRIB); sizeof(CSRSS_WRITE_CONSOLE_OUTPUT_ATTRIB_REQUEST) + CSRSS_MAX_WRITE_CONSOLE_OUTPUT_ATTRIB);
if( !Request ) if( !Request )
{ {
SetLastError( ERROR_OUTOFMEMORY ); SetLastError( ERROR_OUTOFMEMORY );
@ -776,7 +776,7 @@ WriteConsoleOutputAttribute(
memcpy( &Request->Data.WriteConsoleOutputAttribRequest.String[0], memcpy( &Request->Data.WriteConsoleOutputAttribRequest.String[0],
lpAttribute, lpAttribute,
Size * 2 ); Size * 2 );
Status = CsrClientCallServer( Request, &Reply, sizeof( CSRSS_API_REQUEST ), sizeof( CSRSS_API_REPLY ) ); Status = CsrClientCallServer( Request, &Reply, sizeof( CSRSS_WRITE_CONSOLE_OUTPUT_ATTRIB_REQUEST ) + (Size * 2), sizeof( CSRSS_API_REPLY ) );
if( !NT_SUCCESS( Status ) || !NT_SUCCESS( Status = Reply.Status ) ) if( !NT_SUCCESS( Status ) || !NT_SUCCESS( Status = Reply.Status ) )
{ {
SetLastErrorByStatus ( Status ); SetLastErrorByStatus ( Status );