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


The WriteConsole function writes a character string to a console screen buffer beginning at the current cursor location.

Declare Function WriteConsole Lib "kernel32" Alias "WriteConsoleA" (ByVal hConsoleOutput As Long, lpBuffer As Any, ByVal nNumberOfCharsToWrite As Long, lpNumberOfCharsWritten As Long, lpReserved As Any) As Long


Operating Systems Supported
Requires Windows NT 3.1 or later; Requires Windows 95 or later


Parameter Information
- hConsoleOutput
[in] Handle to the console screen buffer to be written to. The handle must have GENERIC_WRITE access.

- lpBuffer
[in] Pointer to a buffer that contains characters to be written to the screen buffer.

- nNumberOfCharsToWrite
[in] Specifies the number of characters to write.

- lpNumberOfCharsWritten
[out] Pointer to a variable that receives the number of TCHARs actually written. For the ANSI version of this function, this is the number of bytes; for the Unicode version, this is the number of characters.

- lpReserved
Reserved; must be NULL.

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.

Last update: 07 April 2006