Kernel32WriteConsoleOutput Method
Writes character and color attribute data to a specified rectangular block of
character cells in a console screen buffer.
The data to be written is taken from a correspondingly sized rectangular block at a
specified location in the source buffer.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
<DllImportAttribute("Kernel32.dll", CharSet := CharSet.Auto, SetLastError := true>]
Public Shared Function WriteConsoleOutput (
consoleOutput As IntPtr,
buffer As IntPtr,
bufferSize As ConsoleCoordinate,
bufferCoord As ConsoleCoordinate,
ByRef refWriteRegion As NativeRectangleSmall
) As Boolean
Dim consoleOutput As IntPtr
Dim buffer As IntPtr
Dim bufferSize As ConsoleCoordinate
Dim bufferCoord As ConsoleCoordinate
Dim refWriteRegion As NativeRectangleSmall
Dim returnValue As Boolean
returnValue = Kernel32.WriteConsoleOutput(consoleOutput,
buffer, bufferSize, bufferCoord,
refWriteRegion)
[<DllImportAttribute("Kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)>]
static member WriteConsoleOutput :
consoleOutput : IntPtr *
buffer : IntPtr *
bufferSize : ConsoleCoordinate *
bufferCoord : ConsoleCoordinate *
refWriteRegion : NativeRectangleSmall byref -> bool
No code example is currently available or this language may not be supported.
- consoleOutput IntPtr
-
A handle to the console screen buffer.
The handle must have the StandardRightsWrite access right.
- buffer IntPtr
-
The data to be written to the console screen buffer.
This pointer is treated as the origin of a two-dimensional array of CharInfo structures
whose size is specified by the bufferSize parameter.
- bufferSize ConsoleCoordinate
-
The size of the buffer pointed to by the buffer parameter, in character cells.
The X member is the number of columns;
the Y member is the number of rows.
- bufferCoord ConsoleCoordinate
-
The coordinates of the upper-left cell in the buffer pointed to by the lpBuffer parameter.
The X member is the column,
and the Y member is the row.
- refWriteRegion NativeRectangleSmall
-
A pointer to a NativeRectangleSmall structure.
On input, the structure members specify the upper-left and lower-right coordinates of the
console screen buffer rectangle to write to.
On output, the structure members specify the actual rectangle that was used.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.
To get extended error information, call
GetLastWin32Error.