Package com.sun.jna.platform.win32
Schnittstelle Wincon
- Alle bekannten Unterschnittstellen:
Kernel32
public interface Wincon
Ported from Wincon.h.
- Autor:
- lgoldstein
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypSchnittstelleBeschreibungstatic class
CONSOLE_SCREEN_BUFFER_INFO structurestatic class
COORD structurestatic class
INPUT_RECORD structurestatic class
KEY_EVENT_RECORD structurestatic class
MOUSE_EVENT_RECORD structurestatic class
SMALL_RECT structurestatic class
WINDOW_BUFFER_SIZE_RECORD structure -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
Allocates a new console for the calling process.boolean
AttachConsole
(int dwProcessId) Attaches the calling process to the console of the specified processboolean
FlushConsoleInputBuffer
(WinNT.HANDLE hConsoleInput) Flushes the console input buffer.boolean
Detaches the calling process from its consoleboolean
GenerateConsoleCtrlEvent
(int dwCtrlEvent, int dwProcessGroupId) Sends a specified signal to a console process group that shares the console associated with the calling process.int
boolean
GetConsoleDisplayMode
(IntByReference lpModeFlags) Retrieves the display mode of the current consoleboolean
GetConsoleMode
(WinNT.HANDLE hConsoleHandle, IntByReference lpMode) int
GetConsoleOriginalTitle
(char[] lpConsoleTitle, int nSize) int
boolean
GetConsoleScreenBufferInfo
(WinNT.HANDLE hConsoleOutput, Wincon.CONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo) Retrieves information about the specified console screen buffer.int
GetConsoleTitle
(char[] lpConsoleTitle, int nSize) boolean
GetNumberOfConsoleInputEvents
(WinNT.HANDLE hConsoleInput, IntByReference lpcNumberOfEvents) boolean
GetNumberOfConsoleMouseButtons
(IntByReference lpNumberOfMouseButtons) GetStdHandle
(int nStdHandle) boolean
ReadConsoleInput
(WinNT.HANDLE hConsoleInput, Wincon.INPUT_RECORD[] lpBuffer, int nLength, IntByReference lpNumberOfEventsRead) Reads data from a console input buffer and removes it from the buffer.boolean
SetConsoleCP
(int wCodePageID) boolean
SetConsoleMode
(WinNT.HANDLE hConsoleHandle, int dwMode) boolean
SetConsoleOutputCP
(int wCodePageID) boolean
SetConsoleTitle
(String lpConsoleTitle) boolean
SetStdHandle
(int nStdHandle, WinNT.HANDLE hHandle) boolean
WriteConsole
(WinNT.HANDLE hConsoleOutput, String lpBuffer, int nNumberOfCharsToWrite, IntByReference lpNumberOfCharsWritten, WinDef.LPVOID lpReserved) Writes a character string to a console screen buffer beginning at the current cursor location.
-
Felddetails
-
ATTACH_PARENT_PROCESS
static final int ATTACH_PARENT_PROCESS- Siehe auch:
-
CTRL_C_EVENT
static final int CTRL_C_EVENT- Siehe auch:
-
CTRL_BREAK_EVENT
static final int CTRL_BREAK_EVENT- Siehe auch:
-
STD_INPUT_HANDLE
static final int STD_INPUT_HANDLE- Siehe auch:
-
STD_OUTPUT_HANDLE
static final int STD_OUTPUT_HANDLE- Siehe auch:
-
STD_ERROR_HANDLE
static final int STD_ERROR_HANDLE- Siehe auch:
-
CONSOLE_FULLSCREEN
static final int CONSOLE_FULLSCREEN- Siehe auch:
-
CONSOLE_FULLSCREEN_HARDWARE
static final int CONSOLE_FULLSCREEN_HARDWARE- Siehe auch:
-
ENABLE_PROCESSED_INPUT
static final int ENABLE_PROCESSED_INPUT- Siehe auch:
-
ENABLE_LINE_INPUT
static final int ENABLE_LINE_INPUT- Siehe auch:
-
ENABLE_ECHO_INPUT
static final int ENABLE_ECHO_INPUT- Siehe auch:
-
ENABLE_WINDOW_INPUT
static final int ENABLE_WINDOW_INPUT- Siehe auch:
-
ENABLE_MOUSE_INPUT
static final int ENABLE_MOUSE_INPUT- Siehe auch:
-
ENABLE_INSERT_MODE
static final int ENABLE_INSERT_MODE- Siehe auch:
-
ENABLE_QUICK_EDIT_MODE
static final int ENABLE_QUICK_EDIT_MODE- Siehe auch:
-
ENABLE_EXTENDED_FLAGS
static final int ENABLE_EXTENDED_FLAGS- Siehe auch:
-
ENABLE_VIRTUAL_TERMINAL_PROCESSING
static final int ENABLE_VIRTUAL_TERMINAL_PROCESSING- Siehe auch:
-
DISABLE_NEWLINE_AUTO_RETURN
static final int DISABLE_NEWLINE_AUTO_RETURN- Siehe auch:
-
ENABLE_VIRTUAL_TERMINAL_INPUT
static final int ENABLE_VIRTUAL_TERMINAL_INPUT- Siehe auch:
-
ENABLE_PROCESSED_OUTPUT
static final int ENABLE_PROCESSED_OUTPUT- Siehe auch:
-
ENABLE_WRAP_AT_EOL_OUTPUT
static final int ENABLE_WRAP_AT_EOL_OUTPUT- Siehe auch:
-
MAX_CONSOLE_TITLE_LENGTH
static final int MAX_CONSOLE_TITLE_LENGTH- Siehe auch:
-
-
Methodendetails
-
AllocConsole
boolean AllocConsole()Allocates a new console for the calling process.- Gibt zurück:
true
if successful - iffalse
then useGetLastError()
to get extended error information- Siehe auch:
-
FreeConsole
boolean FreeConsole()Detaches the calling process from its console- Gibt zurück:
true
if successful - iffalse
then useGetLastError()
to get extended error information- Siehe auch:
-
AttachConsole
boolean AttachConsole(int dwProcessId) Attaches the calling process to the console of the specified process- Parameter:
dwProcessId
- The identifier of the process whose console is to be used. Can be either the process ID or the specialATTACH_PARENT_PROCESS
value to indicate the console of the parent of the current process.- Gibt zurück:
true
if successful - iffalse
then useGetLastError()
to get extended error information- Siehe auch:
-
FlushConsoleInputBuffer
Flushes the console input buffer. All input records currently in the input buffer are discarded.- Parameter:
hConsoleInput
- A handle to the console input buffer. The handle must have the GENERIC_WRITE access right.- Gibt zurück:
true
if successful - iffalse
then useGetLastError()
to get extended error information- Siehe auch:
-
GenerateConsoleCtrlEvent
boolean GenerateConsoleCtrlEvent(int dwCtrlEvent, int dwProcessGroupId) Sends a specified signal to a console process group that shares the console associated with the calling process.- Parameter:
dwCtrlEvent
- The type of signal to be generated.dwProcessGroupId
- The identifier of the process group to receive the signal- Gibt zurück:
true
if successful - iffalse
then useGetLastError()
to get extended error information- Siehe auch:
-
GetConsoleCP
int GetConsoleCP()- Gibt zurück:
- Code that identifies the code page
- Siehe auch:
-
SetConsoleCP
boolean SetConsoleCP(int wCodePageID) - Parameter:
wCodePageID
- The identifier of the code page to be set- Gibt zurück:
true
if successful - iffalse
then useGetLastError()
to get extended error information- Siehe auch:
-
GetConsoleOutputCP
int GetConsoleOutputCP()- Gibt zurück:
- Retrieves the output code page used by the console associated with the calling process.
- Siehe auch:
-
SetConsoleOutputCP
boolean SetConsoleOutputCP(int wCodePageID) - Parameter:
wCodePageID
- The output code page used by the console associated with the calling process.- Gibt zurück:
true
if successful - iffalse
then useGetLastError()
to get extended error information- Siehe auch:
-
GetConsoleWindow
WinDef.HWND GetConsoleWindow()- Gibt zurück:
- The window handle used by the console associated with the calling process
-
GetNumberOfConsoleInputEvents
- Parameter:
hConsoleInput
- A handle to the console input buffer. The handle must have the GENERIC_READ access rightlpcNumberOfEvents
- A pointer to a variable that receives the number of unread input records in the console's input buffer- Gibt zurück:
true
if successful - iffalse
then useGetLastError()
to get extended error information- Siehe auch:
-
GetNumberOfConsoleMouseButtons
- Parameter:
lpNumberOfMouseButtons
- A pointer to a variable that receives the number of mouse buttons- Gibt zurück:
true
if successful - iffalse
then useGetLastError()
to get extended error information- Siehe auch:
-
GetStdHandle
- Parameter:
nStdHandle
- The standard device identifier- Gibt zurück:
- A handle to the specified standard device (standard input, output, or error)
-
SetStdHandle
- Parameter:
nStdHandle
- The standard device identifierhHandle
- The handle for the standard device- Gibt zurück:
true
if successful - iffalse
then useGetLastError()
to get extended error information- Siehe auch:
-
GetConsoleDisplayMode
Retrieves the display mode of the current console- Parameter:
lpModeFlags
- The display mode of the console- Gibt zurück:
true
if successful - iffalse
then useGetLastError()
to get extended error information- Siehe auch:
-
GetConsoleMode
- Parameter:
hConsoleHandle
- A handle to the console input buffer or the console screen buffer. The handle must have the GENERIC_READ access rightlpMode
- A pointer to a variable that receives the current mode of the specified buffer- Gibt zurück:
true
if successful - iffalse
then useGetLastError()
to get extended error information- Siehe auch:
-
SetConsoleMode
- Parameter:
hConsoleHandle
- A handle to the console input buffer or a console screen buffer. The handle must have the GENERIC_READ access rightdwMode
- The input or output mode mask to be set- Gibt zurück:
true
if successful - iffalse
then useGetLastError()
to get extended error information- Siehe auch:
-
GetConsoleTitle
int GetConsoleTitle(char[] lpConsoleTitle, int nSize) - Parameter:
lpConsoleTitle
- A pointer to a buffer that receives a null-terminated string containing the title. If the buffer is too small to store the title, the function stores as many characters of the title as will fit in the buffer, ending with a null terminator. Note: useNative.toString(char[])
to convert it to aString
valuenSize
- The size of the buffer pointed to by the lpConsoleTitle parameter, in characters.- Gibt zurück:
- If the function succeeds, the return value is the length of the console
window's title, in characters. If the function fails, the return value is zero
and
GetLastError
returns the error code. - Siehe auch:
-
GetConsoleOriginalTitle
int GetConsoleOriginalTitle(char[] lpConsoleTitle, int nSize) - Parameter:
lpConsoleTitle
- A pointer to a buffer that receives a null-terminated string containing the original title. Note: useNative.toString(char[])
to convert it to aString
valuenSize
- The size of the lpConsoleTitle buffer, in characters- Gibt zurück:
- If the function succeeds, the return value is the length of the
string copied to the buffer, in characters. If the buffer is not large enough
to store the title, the return value is zero and
GetLastError
returnsERROR_SUCCESS
. If the function fails, the return value is zero andGetLastError
returns the error code. - Siehe auch:
-
SetConsoleTitle
- Parameter:
lpConsoleTitle
- The string to be displayed in the title bar of the console window. The total size must be less thanMAX_CONSOLE_TITLE_LENGTH
.- Gibt zurück:
true
if successful - iffalse
then useGetLastError()
to get extended error information- Siehe auch:
-
GetConsoleScreenBufferInfo
boolean GetConsoleScreenBufferInfo(WinNT.HANDLE hConsoleOutput, Wincon.CONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo) Retrieves information about the specified console screen buffer.- Parameter:
hConsoleOutput
- A handle to the console screen buffer.lpConsoleScreenBufferInfo
- A pointer to a CONSOLE_SCREEN_BUFFER_INFO structure that receives the console screen buffer information.- Gibt zurück:
true
if successful - iffalse
then useGetLastError()
to get extended error information- Siehe auch:
-
ReadConsoleInput
boolean ReadConsoleInput(WinNT.HANDLE hConsoleInput, Wincon.INPUT_RECORD[] lpBuffer, int nLength, IntByReference lpNumberOfEventsRead) Reads data from a console input buffer and removes it from the buffer.- Parameter:
hConsoleInput
- A handle to the console input buffer.lpBuffer
- A pointer to an array of INPUT_RECORD structures that receives the input buffer data.nLength
- The size of the array pointed to by the lpBuffer parameter, in array elements.lpNumberOfEventsRead
- A pointer to a variable that receives the number of input records read.- Gibt zurück:
true
if successful - iffalse
then useGetLastError()
to get extended error information- Siehe auch:
-
WriteConsole
boolean WriteConsole(WinNT.HANDLE hConsoleOutput, String lpBuffer, int nNumberOfCharsToWrite, IntByReference lpNumberOfCharsWritten, WinDef.LPVOID lpReserved) Writes a character string to a console screen buffer beginning at the current cursor location.- Parameter:
hConsoleOutput
- A handle to the console screen buffer.lpBuffer
- A pointer to a buffer that contains characters to be written to the console screen buffer.nNumberOfCharsToWrite
- The number of characters to be written.lpNumberOfCharsWritten
- A pointer to a variable that receives the number of characters actually written.lpReserved
- Reserved; must be NULL.- Gibt zurück:
true
if successful - iffalse
then useGetLastError()
to get extended error information- Siehe auch:
-