На главную

On-line справка по Win32 API

Написать письмо
БЕСПЛАТНАЯ ежедневная online лотерея! Выигрывай каждый день БЕСПЛАТНО!
Список всех статей A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z | Скачать Вниз

ReadConsoleOutputCharacter



The ReadConsoleOutputCharacter function copies a number of characters from consecutive cells of a console screen buffer, beginning at a specified location.

BOOL ReadConsoleOutputCharacter(

HANDLE hConsoleOutput, // handle of a console screen buffer
LPTSTR lpCharacter, // address of buffer to receive characters
DWORD nLength, // number of character cells to read from
COORD dwReadCoord, // coordinates of first cell to read from
LPDWORD lpNumberOfCharsRead // address of number of cells read from
);


Parameters

hConsoleOutput

Identifies a console screen buffer. The handle must have GENERIC_READ access.

lpCharacter

Points to a buffer that receives the characters read from the screen buffer.

nLength

Specifies the number of screen buffer character cells from which to read. The size of the buffer pointed to by the lpCharacter parameter should be nLength * sizeof(TCHAR).

dwReadCoord

Specifies the coordinates of the first cell in the screen buffer from which to read. The X member of the COORD structure is the column, and the Y member is the row.

lpNumberOfCharsRead

Points to a 32-bit variable that receives the number of characters actually read.



Return Values

If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

If the number of characters to be read from extends beyond the end of the specified screen buffer row, characters are read from the next row. If the number of characters to be read from extends beyond the end of the screen buffer, characters up to the end of the screen buffer are read.
Windows NT: This function uses either Unicode characters or 8-bit characters from the console's current codepage. The console's codepage defaults initially to the system's OEM codepage. To change the console's codepage, use the SetConsoleCP or SetConsoleOutputCP functions, or use the chcp or mode con cp select= commands.

See Also

COORD, ReadConsoleOutput, ReadConsoleOutputAttribute, SetConsoleCP, SetConsoleOutputCP, WriteConsoleOutput, WriteConsoleOutputAttribute, WriteConsoleOutputCharacter


Пригласи друзей и счет твоего мобильника всегда будет положительным!
Предыдущая статья
 
Сайт Народ.Ру Интернет
Следующая статья
Пригласи друзей и счет твоего мобильника всегда будет положительным!

ReadConsoleOutputCharacter



Функция ReadConsoleOutputCharacter копирует множество символы из последовательный ячейки консольный экранный буфер, начинающееся в определенной позиции.

BOOL ReadConsoleOutputCharacter(

РУЧКА hConsoleOutput, // ручка консоли отгораживают буфер LPTSTR lpCharacter, // адрес буфера, чтобы получать символы DWORD nLength, // количество символьных ячеек, чтобы читаться из COORD dwReadCoord, // координат первой ячейки, чтобы читаться из адреса LPDWORD lpNumberOfCharsRead // количества ячеек прочитанных из
);


Параметры

hConsoleOutput

Идентифицирует консольный экранный буфер. Ручка должна иметь доступ GENERIC_READ.

lpCharacter

Точки на буфер, которые получают символы прочитанные из экранного буфера.

nLength

Определяет количество экранных буферных символьных ячеек из которых, чтобы читаться. Размер буфера указанного, чтобы параметром lpCharacter должен быть nLength * sizeof(TCHAR).

dwReadCoord

Определяет координаты первой ячейки в экранном буфере из которой, чтобы читаться. Член X структуры COORD является колонной, и член Y является колонкой.

lpNumberOfCharsRead

Точки на 32- битовую переменную, которые получают количество действительно прочитанных символов.



Обратные Величины

Если функция добивается успеха, обратная величина ненулевая.
Если функция терпит неудачу, обратная величина нулевая. Для того, чтобы расширять информацию ошибки, назовите GetLastError.

Замечания

Если количество символов, которые нужно быть прочитаны из расширяется за концом определенной экранной буферной колонки, символы прочитаны из следующей колонки. Если количество символов, которые нужно быть прочитаны из расширяется за концом экранного буфера, символы вплоть до конца экранного буфера прочитаны.
Windows NT: Эта функция использует или символы Уникода или 8- битовых символов из консольного текущего codepage. Консольный codepage устанавливается по умолчанию первоначально в системный codepage OEM. Для того, чтобы изменять консольный codepage, используйте SetConsoleCP или функции SetConsoleOutputCP, или используйте chcp или жулика режима cp выбирать= команды.

Смотри Также

COORD, ReadConsoleOutput, ReadConsoleOutputAttribute, SetConsoleCP, SetConsoleOutputCP, WriteConsoleOutput, WriteConsoleOutputAttribute, WriteConsoleOutputCharacter


Вверх Version 1.3, Oct 26 2010 © 2007, 2010, mrhx Вверх
 mrhx software  Русский перевод OpenGL  Русский перевод Win32 API
 
Используются технологии uCoz