Package com.sun.jna.platform.win32
Interface Wincon
- 
- All Known Subinterfaces:
- Kernel32
 
 public interface WinconPorted from Wincon.h.- Author:
- lgoldstein
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classWincon.CONSOLE_SCREEN_BUFFER_INFOCONSOLE_SCREEN_BUFFER_INFO structurestatic classWincon.COORDCOORD structurestatic classWincon.INPUT_RECORDINPUT_RECORD structurestatic classWincon.KEY_EVENT_RECORDKEY_EVENT_RECORD structurestatic classWincon.MOUSE_EVENT_RECORDMOUSE_EVENT_RECORD structurestatic classWincon.SMALL_RECTSMALL_RECT structurestatic classWincon.WINDOW_BUFFER_SIZE_RECORDWINDOW_BUFFER_SIZE_RECORD structure
 - 
Field SummaryFields Modifier and Type Field Description static intATTACH_PARENT_PROCESSstatic intCONSOLE_FULLSCREENstatic intCONSOLE_FULLSCREEN_HARDWAREstatic intCTRL_BREAK_EVENTstatic intCTRL_C_EVENTstatic intDISABLE_NEWLINE_AUTO_RETURNstatic intENABLE_ECHO_INPUTstatic intENABLE_EXTENDED_FLAGSstatic intENABLE_INSERT_MODEstatic intENABLE_LINE_INPUTstatic intENABLE_MOUSE_INPUTstatic intENABLE_PROCESSED_INPUTstatic intENABLE_PROCESSED_OUTPUTstatic intENABLE_QUICK_EDIT_MODEstatic intENABLE_VIRTUAL_TERMINAL_INPUTstatic intENABLE_VIRTUAL_TERMINAL_PROCESSINGstatic intENABLE_WINDOW_INPUTstatic intENABLE_WRAP_AT_EOL_OUTPUTstatic intMAX_CONSOLE_TITLE_LENGTHstatic intSTD_ERROR_HANDLEstatic intSTD_INPUT_HANDLEstatic intSTD_OUTPUT_HANDLE
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanAllocConsole()Allocates a new console for the calling process.booleanAttachConsole(int dwProcessId)Attaches the calling process to the console of the specified processbooleanFlushConsoleInputBuffer(WinNT.HANDLE hConsoleInput)Flushes the console input buffer.booleanFreeConsole()Detaches the calling process from its consolebooleanGenerateConsoleCtrlEvent(int dwCtrlEvent, int dwProcessGroupId)Sends a specified signal to a console process group that shares the console associated with the calling process.intGetConsoleCP()booleanGetConsoleDisplayMode(IntByReference lpModeFlags)Retrieves the display mode of the current consolebooleanGetConsoleMode(WinNT.HANDLE hConsoleHandle, IntByReference lpMode)intGetConsoleOriginalTitle(char[] lpConsoleTitle, int nSize)intGetConsoleOutputCP()booleanGetConsoleScreenBufferInfo(WinNT.HANDLE hConsoleOutput, Wincon.CONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo)Retrieves information about the specified console screen buffer.intGetConsoleTitle(char[] lpConsoleTitle, int nSize)WinDef.HWNDGetConsoleWindow()booleanGetNumberOfConsoleInputEvents(WinNT.HANDLE hConsoleInput, IntByReference lpcNumberOfEvents)booleanGetNumberOfConsoleMouseButtons(IntByReference lpNumberOfMouseButtons)WinNT.HANDLEGetStdHandle(int nStdHandle)booleanReadConsoleInput(WinNT.HANDLE hConsoleInput, Wincon.INPUT_RECORD[] lpBuffer, int nLength, IntByReference lpNumberOfEventsRead)Reads data from a console input buffer and removes it from the buffer.booleanSetConsoleCP(int wCodePageID)booleanSetConsoleMode(WinNT.HANDLE hConsoleHandle, int dwMode)booleanSetConsoleOutputCP(int wCodePageID)booleanSetConsoleTitle(java.lang.String lpConsoleTitle)booleanSetStdHandle(int nStdHandle, WinNT.HANDLE hHandle)booleanWriteConsole(WinNT.HANDLE hConsoleOutput, java.lang.String lpBuffer, int nNumberOfCharsToWrite, IntByReference lpNumberOfCharsWritten, WinDef.LPVOID lpReserved)Writes a character string to a console screen buffer beginning at the current cursor location.
 
- 
- 
- 
Field Detail- 
ATTACH_PARENT_PROCESSstatic final int ATTACH_PARENT_PROCESS - See Also:
- Constant Field Values
 
 - 
CTRL_C_EVENTstatic final int CTRL_C_EVENT - See Also:
- Constant Field Values
 
 - 
CTRL_BREAK_EVENTstatic final int CTRL_BREAK_EVENT - See Also:
- Constant Field Values
 
 - 
STD_INPUT_HANDLEstatic final int STD_INPUT_HANDLE - See Also:
- Constant Field Values
 
 - 
STD_OUTPUT_HANDLEstatic final int STD_OUTPUT_HANDLE - See Also:
- Constant Field Values
 
 - 
STD_ERROR_HANDLEstatic final int STD_ERROR_HANDLE - See Also:
- Constant Field Values
 
 - 
CONSOLE_FULLSCREENstatic final int CONSOLE_FULLSCREEN - See Also:
- Constant Field Values
 
 - 
CONSOLE_FULLSCREEN_HARDWAREstatic final int CONSOLE_FULLSCREEN_HARDWARE - See Also:
- Constant Field Values
 
 - 
ENABLE_PROCESSED_INPUTstatic final int ENABLE_PROCESSED_INPUT - See Also:
- Constant Field Values
 
 - 
ENABLE_LINE_INPUTstatic final int ENABLE_LINE_INPUT - See Also:
- Constant Field Values
 
 - 
ENABLE_ECHO_INPUTstatic final int ENABLE_ECHO_INPUT - See Also:
- Constant Field Values
 
 - 
ENABLE_WINDOW_INPUTstatic final int ENABLE_WINDOW_INPUT - See Also:
- Constant Field Values
 
 - 
ENABLE_MOUSE_INPUTstatic final int ENABLE_MOUSE_INPUT - See Also:
- Constant Field Values
 
 - 
ENABLE_INSERT_MODEstatic final int ENABLE_INSERT_MODE - See Also:
- Constant Field Values
 
 - 
ENABLE_QUICK_EDIT_MODEstatic final int ENABLE_QUICK_EDIT_MODE - See Also:
- Constant Field Values
 
 - 
ENABLE_EXTENDED_FLAGSstatic final int ENABLE_EXTENDED_FLAGS - See Also:
- Constant Field Values
 
 - 
ENABLE_VIRTUAL_TERMINAL_PROCESSINGstatic final int ENABLE_VIRTUAL_TERMINAL_PROCESSING - See Also:
- Constant Field Values
 
 - 
DISABLE_NEWLINE_AUTO_RETURNstatic final int DISABLE_NEWLINE_AUTO_RETURN - See Also:
- Constant Field Values
 
 - 
ENABLE_VIRTUAL_TERMINAL_INPUTstatic final int ENABLE_VIRTUAL_TERMINAL_INPUT - See Also:
- Constant Field Values
 
 - 
ENABLE_PROCESSED_OUTPUTstatic final int ENABLE_PROCESSED_OUTPUT - See Also:
- Constant Field Values
 
 - 
ENABLE_WRAP_AT_EOL_OUTPUTstatic final int ENABLE_WRAP_AT_EOL_OUTPUT - See Also:
- Constant Field Values
 
 - 
MAX_CONSOLE_TITLE_LENGTHstatic final int MAX_CONSOLE_TITLE_LENGTH - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
AllocConsoleboolean AllocConsole() Allocates a new console for the calling process.- Returns:
- trueif successful - if- falsethen use- GetLastError()to get extended error information
- See Also:
- AllocConsole documentation
 
 - 
FreeConsoleboolean FreeConsole() Detaches the calling process from its console- Returns:
- trueif successful - if- falsethen use- GetLastError()to get extended error information
- See Also:
- FreeConsole documentation
 
 - 
AttachConsoleboolean AttachConsole(int dwProcessId) Attaches the calling process to the console of the specified process- Parameters:
- dwProcessId- The identifier of the process whose console is to be used. Can be either the process ID or the special- ATTACH_PARENT_PROCESSvalue to indicate the console of the parent of the current process.
- Returns:
- trueif successful - if- falsethen use- GetLastError()to get extended error information
- See Also:
- AttachConsole documentation
 
 - 
FlushConsoleInputBufferboolean FlushConsoleInputBuffer(WinNT.HANDLE hConsoleInput) Flushes the console input buffer. All input records currently in the input buffer are discarded.- Parameters:
- hConsoleInput- A handle to the console input buffer. The handle must have the GENERIC_WRITE access right.
- Returns:
- trueif successful - if- falsethen use- GetLastError()to get extended error information
- See Also:
- FlushConsoleInputBuffer documentation
 
 - 
GenerateConsoleCtrlEventboolean GenerateConsoleCtrlEvent(int dwCtrlEvent, int dwProcessGroupId)Sends a specified signal to a console process group that shares the console associated with the calling process.- Parameters:
- dwCtrlEvent- The type of signal to be generated.
- dwProcessGroupId- The identifier of the process group to receive the signal
- Returns:
- trueif successful - if- falsethen use- GetLastError()to get extended error information
- See Also:
- GenerateConsoleCtrlEvent documentation
 
 - 
GetConsoleCPint GetConsoleCP() - Returns:
- Code that identifies the code page
- See Also:
- Code page identifiers
 
 - 
SetConsoleCPboolean SetConsoleCP(int wCodePageID) - Parameters:
- wCodePageID- The identifier of the code page to be set
- Returns:
- trueif successful - if- falsethen use- GetLastError()to get extended error information
- See Also:
- SetConsoleCP documentation
 
 - 
GetConsoleOutputCPint GetConsoleOutputCP() - Returns:
- Retrieves the output code page used by the console associated with the calling process.
- See Also:
- Code page identifiers
 
 - 
SetConsoleOutputCPboolean SetConsoleOutputCP(int wCodePageID) - Parameters:
- wCodePageID- The output code page used by the console associated with the calling process.
- Returns:
- trueif successful - if- falsethen use- GetLastError()to get extended error information
- See Also:
- SetConsoleOutputCP documentation
 
 - 
GetConsoleWindowWinDef.HWND GetConsoleWindow() - Returns:
- The window handle used by the console associated with the calling process
 
 - 
GetNumberOfConsoleInputEventsboolean GetNumberOfConsoleInputEvents(WinNT.HANDLE hConsoleInput, IntByReference lpcNumberOfEvents) - Parameters:
- hConsoleInput- A handle to the console input buffer. The handle must have the GENERIC_READ access right
- lpcNumberOfEvents- A pointer to a variable that receives the number of unread input records in the console's input buffer
- Returns:
- trueif successful - if- falsethen use- GetLastError()to get extended error information
- See Also:
- GetNumberOfConsoleInputEvents documentation
 
 - 
GetNumberOfConsoleMouseButtonsboolean GetNumberOfConsoleMouseButtons(IntByReference lpNumberOfMouseButtons) - Parameters:
- lpNumberOfMouseButtons- A pointer to a variable that receives the number of mouse buttons
- Returns:
- trueif successful - if- falsethen use- GetLastError()to get extended error information
- See Also:
- GetNumberOfConsoleMouseButtons documentation
 
 - 
GetStdHandleWinNT.HANDLE GetStdHandle(int nStdHandle) - Parameters:
- nStdHandle- The standard device identifier
- Returns:
- A handle to the specified standard device (standard input, output, or error)
 
 - 
SetStdHandleboolean SetStdHandle(int nStdHandle, WinNT.HANDLE hHandle)- Parameters:
- nStdHandle- The standard device identifier
- hHandle- The handle for the standard device
- Returns:
- trueif successful - if- falsethen use- GetLastError()to get extended error information
- See Also:
- SetStdHandle documentation
 
 - 
GetConsoleDisplayModeboolean GetConsoleDisplayMode(IntByReference lpModeFlags) Retrieves the display mode of the current console- Parameters:
- lpModeFlags- The display mode of the console
- Returns:
- trueif successful - if- falsethen use- GetLastError()to get extended error information
- See Also:
- GetConsoleDisplayMode documentation
 
 - 
GetConsoleModeboolean GetConsoleMode(WinNT.HANDLE hConsoleHandle, IntByReference lpMode) - Parameters:
- hConsoleHandle- A handle to the console input buffer or the console screen buffer. The handle must have the GENERIC_READ access right
- lpMode- A pointer to a variable that receives the current mode of the specified buffer
- Returns:
- trueif successful - if- falsethen use- GetLastError()to get extended error information
- See Also:
- GetConsoleMode documentation
 
 - 
SetConsoleModeboolean SetConsoleMode(WinNT.HANDLE hConsoleHandle, int dwMode) - Parameters:
- hConsoleHandle- A handle to the console input buffer or a console screen buffer. The handle must have the GENERIC_READ access right
- dwMode- The input or output mode mask to be set
- Returns:
- trueif successful - if- falsethen use- GetLastError()to get extended error information
- See Also:
- SetConsoleMode documentation
 
 - 
GetConsoleTitleint GetConsoleTitle(char[] lpConsoleTitle, int nSize)- Parameters:
- 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: use- Native.toString(char[])to convert it to a- Stringvalue
- nSize- The size of the buffer pointed to by the lpConsoleTitle parameter, in characters.
- Returns:
- 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 GetLastErrorreturns the error code.
- See Also:
- GetConsoleTitle documentation
 
 - 
GetConsoleOriginalTitleint GetConsoleOriginalTitle(char[] lpConsoleTitle, int nSize)- Parameters:
- lpConsoleTitle- A pointer to a buffer that receives a null-terminated string containing the original title. Note: use- Native.toString(char[])to convert it to a- Stringvalue
- nSize- The size of the lpConsoleTitle buffer, in characters
- Returns:
- 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 GetLastErrorreturnsERROR_SUCCESS. If the function fails, the return value is zero andGetLastErrorreturns the error code.
- See Also:
- GetConsoleOriginalTitle documentation
 
 - 
SetConsoleTitleboolean SetConsoleTitle(java.lang.String lpConsoleTitle) - Parameters:
- lpConsoleTitle- The string to be displayed in the title bar of the console window. The total size must be less than- MAX_CONSOLE_TITLE_LENGTH.
- Returns:
- trueif successful - if- falsethen use- GetLastError()to get extended error information
- See Also:
- SetConsoleTitle documentation
 
 - 
GetConsoleScreenBufferInfoboolean GetConsoleScreenBufferInfo(WinNT.HANDLE hConsoleOutput, Wincon.CONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo) Retrieves information about the specified console screen buffer.- Parameters:
- 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.
- Returns:
- trueif successful - if- falsethen use- GetLastError()to get extended error information
- See Also:
- GetConsoleScreenBufferInfo documentation
 
 - 
ReadConsoleInputboolean 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.- Parameters:
- 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.
- Returns:
- trueif successful - if- falsethen use- GetLastError()to get extended error information
- See Also:
- ReadConsoleInput documentation
 
 - 
WriteConsoleboolean WriteConsole(WinNT.HANDLE hConsoleOutput, java.lang.String lpBuffer, int nNumberOfCharsToWrite, IntByReference lpNumberOfCharsWritten, WinDef.LPVOID lpReserved) Writes a character string to a console screen buffer beginning at the current cursor location.- Parameters:
- 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.
- Returns:
- trueif successful - if- falsethen use- GetLastError()to get extended error information
- See Also:
- WriteConsole documentation
 
 
- 
 
-