Print Topic - Archive

XBLite Forum  /  XBLite Programming  /  problem with ReadConsoleOutputA
Posted by: stapper, July 19, 2011, 12:28pm
Hi,

Iam new in xblie, i have problem when Compiling it always give the message "type mismatch at (50)". The problem is in the last line.

Here is the code

' #####  PROLOG  #####
' ####################
'
PROGRAM     "buffertest"
VERSION     "0.0001"
CONSOLE
'
     IMPORT     "xst"   ' Standard library : required by most programs
     IMPORT     "kernel32"
     IMPORT     "xio"
'

DECLARE FUNCTION  Entry ()
'
'
' ######################
' #####  Entry ()  #####
' ######################
'
FUNCTION  Entry ()

     SMALL_RECT srctReadRect,srctWriteRect
  CHAR_INFO chiBuffer[160]  
  COORD coordBufSize,coordBufCoord

     hStdout = GetStdHandle(STD_OUTPUT_HANDLE)
     hNewScreenBuffer = CreateConsoleScreenBuffer($$GENERIC_READ|$$GENERIC_WRITE,$$FILE_SHARE_READ|$$FILE_SHARE_WRITE,NULL,$$CONSOLE_TEXTMODE_BUFFER,NULL)                          
     SetConsoleActiveScreenBuffer(hNewScreenBuffer)
     srctReadRect.Top = 0
     srctReadRect.Left = 0
     srctReadRect.Bottom = 1
     srctReadRect.Right = 79
     coordBufSize.x = 2
     coordBufSize.x = 80
     coordBufCoord.x = 0
     coordBufCoord.y = 0
     ReadConsoleOutputA(hStdout,chiBuffer,coordBufSize,coordBufCoord,&srctReadRect)


END FUNCTION
END PROGRAM

Can someone help me ?

Regards

patrick
Print page generated: June 19, 2018, 12:32pm