Kernel32GetConsoleFontSize Method
Retrieves the size of the font used by the specified console screen 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", SetLastError = true)]
public static ConsoleCoordinate GetConsoleFontSize(
IntPtr consoleOutput,
int fontIndex
)
<DllImportAttribute("kernel32.dll", SetLastError := true>]
Public Shared Function GetConsoleFontSize (
consoleOutput As IntPtr,
fontIndex As Integer
) As ConsoleCoordinate
Dim consoleOutput As IntPtr
Dim fontIndex As Integer
Dim returnValue As ConsoleCoordinate
returnValue = Kernel32.GetConsoleFontSize(consoleOutput,
fontIndex)
public:
[DllImportAttribute(L"kernel32.dll", SetLastError = true)]
static ConsoleCoordinate GetConsoleFontSize(
IntPtr consoleOutput,
int fontIndex
)
[<DllImportAttribute("kernel32.dll", SetLastError = true)>]
static member GetConsoleFontSize :
consoleOutput : IntPtr *
fontIndex : int -> ConsoleCoordinate
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 GENERIC_READ access right.
- fontIndex Int32
-
The index of the font whose size is to be retrieved.
This index is obtained by calling the GetCurrentConsoleFont(IntPtr, Boolean, ConsoleFontInfo) function.
ConsoleCoordinate
If the function succeeds, the return value is a
ConsoleCoordinate structure
that contains the width and height of each character in the font, in logical units.
The
X member contains the width,
while the
Y member contains the height.
If the function fails, the
X and
Y members are zero.
To get extended error information, call
GetLastWin32Error.