# File lib\Win32/Console.rb, line 391 def ReadConsoleOutput( hConsoleOutput, lpBuffer, cols, rows, bufx, bufy, left, top, right, bottom ) if @@m_ReadConsoleOutput == nil @@m_ReadConsoleOutput = Win32API.new( "kernel32", "ReadConsoleOutput", ['l', 'p', 'l', 'l', 'p'], 'l' ) end dwBufferSize = cols * rows * 4 lpBuffer = ' ' * dwBufferSize dwBufferCoord = (bufy << 16) + bufx lpReadRegion = [ left, top, right, bottom ].pack('ssss') @@m_ReadConsoleOutput.call( hConsoleOutput, lpBuffer, dwBufferSize, dwBufferCoord, lpReadRegion ) end