WriteConsole
Jump to navigation
Jump to search
Description
Writes a character string to a console screen buffer beginning at the current cursor location.
Syntax
BOOL WINAPI WriteConsole(
_In_ HANDLE hConsoleOutput,
_In_ const VOID *lpBuffer,
_In_ DWORD nNumberOfCharsToWrite,
_Out_ LPDWORD lpNumberOfCharsWritten,
_Reserved_ LPVOID lpReserved
);
Parameters
- hConsoleOutput [in]
- A handle to the console screen buffer. The handle must have the GENERIC_WRITE access right.
- lpBuffer [in]
- A pointer to a buffer that contains characters to be written to the console screen buffer.
- The storage for this buffer is allocated from a shared heap for the process that is 64 KB in size. The maximum size of the buffer will depend on heap usage.
- nNumberOfCharsToWrite [in]
- The number of characters to be written. If the total size of the specified number of characters exceeds the available heap, the function fails with ERROR_NOT_ENOUGH_MEMORY.
- lpNumberOfCharsWritten [out]
- A pointer to a variable that receives the number of characters actually written.
- lpReserved
- Reserved; must be NULL.
Return value
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.