- java.lang.Object
-
- de.ibapl.jnhw.winapi.Winbase
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWinbase.COMMTIMEOUTSWIN:structure COMMTIMEOUTS.static classWinbase.COMSTATWIN:structure COMSTAT.static classWinbase.DCBWIN:structure DCB.
-
Field Summary
Fields Modifier and Type Field Description static byteCE_BREAKCE_BREAK The hardware detected a break condition.static byteCE_FRAMECE_FRAME The hardware detected a framing error.static byteCE_OVERRUNCE_OVERRUN A character-buffer overrun has occurred.static byteCE_RXOVERCE_RXOVER An input buffer overflow has occurred.static byteCE_RXPARITYCE_RXPARITY The hardware detected a parity error.static intCLRBREAKCLRBREAK Restores character transmission and places the transmission line in a nonbreak state.static intCLRDTRCLRDTR Clears the DTR (data-terminal-ready) signal.static intCLRRTSCLRRTS Clears the RTS (request-to-send) signal.static byteDTR_CONTROL_DISABLEDTR_CONTROL_DISABLE Disables the DTR line when the device is opened and leaves it disabled.static byteDTR_CONTROL_ENABLEDTR_CONTROL_ENABLE Enables the DTR line when the device is opened and leaves it on.static byteDTR_CONTROL_HANDSHAKEDTR_CONTROL_HANDSHAKE Enables DTR handshaking.static byteEVENPARITYEVENPARITY Even parity.static intFILE_FLAG_BACKUP_SEMANTICSFILE_FLAG_BACKUP_SEMANTICS The file is being opened or created for a backup or restore operation.static intFILE_FLAG_DELETE_ON_CLOSEFILE_FLAG_DELETE_ON_CLOSE The file is to be deleted immediately after all of its handles are closed, which includes the specified handle and any other open or duplicated handles.static intFILE_FLAG_NO_BUFFERINGFILE_FLAG_NO_BUFFERING The file or device is being opened with no system caching for data reads and writes.static intFILE_FLAG_OPEN_NO_RECALLFILE_FLAG_OPEN_NO_RECALL The file data is requested, but it should continue to be located in remote storage.static intFILE_FLAG_OPEN_REPARSE_POINTFILE_FLAG_OPEN_REPARSE_POINT Normal reparse point processing will not occur; CreateFile will attempt to open the reparse point.static intFILE_FLAG_OVERLAPPEDFILE_FLAG_OVERLAPPED The file or device is being opened or created for asynchronous I/O.static intFILE_FLAG_POSIX_SEMANTICSFILE_FLAG_POSIX_SEMANTICS Access will occur according to POSIX rules.static intFILE_FLAG_RANDOM_ACCESSFILE_FLAG_RANDOM_ACCESS Access is intended to be random.static intFILE_FLAG_SEQUENTIAL_SCANFILE_FLAG_SEQUENTIAL_SCAN Access is intended to be sequential from beginning to end.static intFILE_FLAG_SESSION_AWAREFILE_FLAG_SESSION_AWARE The file or device is being opened with session awareness.static intFILE_FLAG_WRITE_THROUGHFILE_FLAG_WRITE_THROUGH Write operations will not go through any intermediate cache, they will go directly to disk.static byteFILE_SKIP_COMPLETION_PORT_ON_SUCCESSFILE_SKIP_COMPLETION_PORT_ON_SUCCESS If some conditions are true, the I/O Manager does not queue a completion entry to the port, when it would ordinarily do so.static byteFILE_SKIP_SET_EVENT_ON_HANDLEFILE_SKIP_SET_EVENT_ON_HANDLE The I/O Manager does not set the event for the file object if a request returns with a success code, or the error returned is ERROR_PENDING and the function that is called is not a synchronous function.static intINFINITEstatic byteMARKPARITYMARKPARITY Mark parity.static intMS_CTS_ONMS_CTS_ON The CTS (clear-to-send) signal is on.static intMS_DSR_ONMS_DSR_ON The DSR (data-set-ready) signal is on.static intMS_RING_ONMS_RING_ON The ring indicator signal is on.static intMS_RLSD_ONMS_RLSD_ON The RLSD (receive-line-signal-detect) signal is on.static byteNOPARITYNOPARITY No parity.static byteODDPARITYODDPARITY Odd parity.static byteONE5STOPBITSONE5STOPBITS 1.5 stop bits.static byteONESTOPBITONESTOPBIT 1 stop bit.static intRESETDEVstatic byteRTS_CONTROL_DISABLERTS_CONTROL_DISABLE Disables the RTS line when the device is opened and leaves it disabled.static byteRTS_CONTROL_ENABLERTS_CONTROL_ENABLE Enables the RTS line when the device is opened and leaves it on.static byteRTS_CONTROL_HANDSHAKERTS_CONTROL_HANDSHAKE Enables RTS handshaking.static byteRTS_CONTROL_TOGGLERTS_CONTROL_TOGGLE Specifies that the RTS line will be high if bytes are available for transmission.static intSECURITY_ANONYMOUSSECURITY_ANONYMOUS Impersonates a client at the Anonymous impersonation level.static intSECURITY_CONTEXT_TRACKINGSECURITY_CONTEXT_TRACKING he security tracking mode is dynamic.static intSECURITY_DELEGATIONSECURITY_DELEGATION Impersonates a client at the Delegation impersonation level.static intSECURITY_EFFECTIVE_ONLYSECURITY_EFFECTIVE_ONLY Only the enabled aspects of the client's security context are available to the server.static intSECURITY_IDENTIFICATIONSECURITY_IDENTIFICATION Impersonates a client at the Identification impersonation level.static intSECURITY_IMPERSONATIONSECURITY_IMPERSONATION Impersonate a client at the impersonation level.static intSETBREAKSETBREAK Suspends character transmission and places the transmission line in a break state until the ClearCommBreak function is called (or EscapeCommFunction is called with the CLRBREAK extended function code).static intSETDTRSETDTR Sends the DTR (data-terminal-ready) signal.static intSETRTSSETRTS Sends the RTS (request-to-send) signal.static intSETXOFFSETXOFF Causes transmission to act as if an XOFF character has been received.static intSETXONSETXON Causes transmission to act as if an XON character has been received.static byteSPACEPARITYSPACEPARITY Space parity.static intSTD_ERROR_HANDLESTD_ERROR_HANDLE The standard error device.static intSTD_INPUT_HANDLESTD_INPUT_HANDLE The standard input device.static intSTD_OUTPUT_HANDLESTD_OUTPUT_HANDLE The standard output device.static byteTWOSTOPBITSTWOSTOPBITS 2 stop bits.static intWAIT_ABANDONEDstatic intWAIT_FAILEDWAIT_FAILED The specified object is a mutex object that was not released by the thread that owned the mutex object before the owning thread terminated.static intWAIT_IO_COMPLETIONWAIT_IO_COMPLETION The state of the specified object is signaled.static intWAIT_OBJECT_0WAIT_OBJECT_0 The state of the specified object is signaled.
-
Constructor Summary
Constructors Constructor Description Winbase()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidBindIoCompletionCallback(Winnt.HANDLE FileHandle, Minwinbase.LPOVERLAPPED_COMPLETION_ROUTINE Function, int Flags)* BindIoCompletionCallback Associates the I/O completion port owned by the thread pool with the specified file handle.static voidClearCommBreak(Winnt.HANDLE hFile)ClearCommBreak Restores character transmission for a specified communications device and places the transmission line in a nonbreak state.static voidClearCommError(Winnt.HANDLE hFile, Int32_t lpErrors, Winbase.COMSTAT lpStat)ClearCommError Retrieves information about a communications error and reports the current status of a communications device.static voidEscapeCommFunction(Winnt.HANDLE hFile, int dwFunc)EscapeCommFunction Directs the specified communications device to perform an extended function.static voidGetCommModemStatus(Winnt.HANDLE hFile, Int32_t lpModemStat)GetCommModemStatus Directs the specified communications device to perform an extended function.static voidGetCommState(Winnt.HANDLE hFile, Winbase.DCB lpDCB)GetCommState Retrieves the current control settings for a specified communications device.static voidGetCommTimeouts(Winnt.HANDLE hFile, Winbase.COMMTIMEOUTS lpCommTimeouts)GetCommTimeouts Retrieves the time-out parameters for all read and write operations on a specified communications device.static voidSetCommBreak(Winnt.HANDLE hFile)SetCommBreak Suspends character transmission for a specified communications device and places the transmission line in a break state until the ClearCommBreak function is called.static voidSetCommState(Winnt.HANDLE hFile, Winbase.DCB lpDCB)SetCommState Configures a communications device according to the specifications in a device-control block (aWinbase.DCBstructure).static voidSetCommTimeouts(Winnt.HANDLE hFile, Winbase.COMMTIMEOUTS lpCommTimeouts)SetCommTimeouts Sets the time-out parameters for all read and write operations on a specified communications device.static voidSetFileCompletionNotificationModes(Winnt.HANDLE hFile, byte uFlags)SetFileCompletionNotificationModes Sets the notification modes for a file handle, allowing you to specify how completion notifications work for the specified file.
-
-
-
Field Detail
-
CE_BREAK
@Define public static final byte CE_BREAK
CE_BREAK The hardware detected a break condition.- See Also:
- Constant Field Values
-
CE_FRAME
@Define public static final byte CE_FRAME
CE_FRAME The hardware detected a framing error.- See Also:
- Constant Field Values
-
CE_OVERRUN
@Define public static final byte CE_OVERRUN
CE_OVERRUN A character-buffer overrun has occurred. The next character is lost.- See Also:
- Constant Field Values
-
CE_RXOVER
@Define public static final byte CE_RXOVER
CE_RXOVER An input buffer overflow has occurred. There is either no room in the input buffer, or a character was received after the end-of-file (EOF) character.- See Also:
- Constant Field Values
-
CE_RXPARITY
@Define public static final byte CE_RXPARITY
CE_RXPARITY The hardware detected a parity error.- See Also:
- Constant Field Values
-
CLRBREAK
@Define public static final int CLRBREAK
CLRBREAK Restores character transmission and places the transmission line in a nonbreak state. The CLRBREAK extended function code is identical to the ClearCommBreak function.- See Also:
- Constant Field Values
-
CLRDTR
@Define public static final int CLRDTR
CLRDTR Clears the DTR (data-terminal-ready) signal.- See Also:
- Constant Field Values
-
CLRRTS
@Define public static final int CLRRTS
CLRRTS Clears the RTS (request-to-send) signal.- See Also:
- Constant Field Values
-
DTR_CONTROL_DISABLE
@Define public static final byte DTR_CONTROL_DISABLE
DTR_CONTROL_DISABLE Disables the DTR line when the device is opened and leaves it disabled.- See Also:
- Constant Field Values
-
DTR_CONTROL_ENABLE
@Define public static final byte DTR_CONTROL_ENABLE
DTR_CONTROL_ENABLE Enables the DTR line when the device is opened and leaves it on.- See Also:
- Constant Field Values
-
DTR_CONTROL_HANDSHAKE
@Define public static final byte DTR_CONTROL_HANDSHAKE
DTR_CONTROL_HANDSHAKE Enables DTR handshaking. If handshaking is enabled, it is an error for the application to adjust the line by using the EscapeCommFunction function.- See Also:
- Constant Field Values
-
EVENPARITY
@Define public static final byte EVENPARITY
EVENPARITY Even parity.- See Also:
- Constant Field Values
-
FILE_FLAG_BACKUP_SEMANTICS
@Define public static final int FILE_FLAG_BACKUP_SEMANTICS
FILE_FLAG_BACKUP_SEMANTICS The file is being opened or created for a backup or restore operation.- See Also:
- Constant Field Values
-
FILE_FLAG_DELETE_ON_CLOSE
@Define public static final int FILE_FLAG_DELETE_ON_CLOSE
FILE_FLAG_DELETE_ON_CLOSE The file is to be deleted immediately after all of its handles are closed, which includes the specified handle and any other open or duplicated handles.- See Also:
- Constant Field Values
-
FILE_FLAG_NO_BUFFERING
@Define public static final int FILE_FLAG_NO_BUFFERING
FILE_FLAG_NO_BUFFERING The file or device is being opened with no system caching for data reads and writes.- See Also:
- Constant Field Values
-
FILE_FLAG_OPEN_NO_RECALL
@Define public static final int FILE_FLAG_OPEN_NO_RECALL
FILE_FLAG_OPEN_NO_RECALL The file data is requested, but it should continue to be located in remote storage.- See Also:
- Constant Field Values
-
FILE_FLAG_OPEN_REPARSE_POINT
@Define public static final int FILE_FLAG_OPEN_REPARSE_POINT
FILE_FLAG_OPEN_REPARSE_POINT Normal reparse point processing will not occur; CreateFile will attempt to open the reparse point.- See Also:
- Constant Field Values
-
FILE_FLAG_OVERLAPPED
@Define public static final int FILE_FLAG_OVERLAPPED
FILE_FLAG_OVERLAPPED The file or device is being opened or created for asynchronous I/O.- See Also:
- Constant Field Values
-
FILE_FLAG_POSIX_SEMANTICS
@Define public static final int FILE_FLAG_POSIX_SEMANTICS
FILE_FLAG_POSIX_SEMANTICS Access will occur according to POSIX rules.- See Also:
- Constant Field Values
-
FILE_FLAG_RANDOM_ACCESS
@Define public static final int FILE_FLAG_RANDOM_ACCESS
FILE_FLAG_RANDOM_ACCESS Access is intended to be random. The system can use this as a hint to optimize file caching.- See Also:
- Constant Field Values
-
FILE_FLAG_SEQUENTIAL_SCAN
@Define public static final int FILE_FLAG_SEQUENTIAL_SCAN
FILE_FLAG_SEQUENTIAL_SCAN Access is intended to be sequential from beginning to end.- See Also:
- Constant Field Values
-
FILE_FLAG_SESSION_AWARE
@Define public static final int FILE_FLAG_SESSION_AWARE
FILE_FLAG_SESSION_AWARE The file or device is being opened with session awareness.- See Also:
- Constant Field Values
-
FILE_FLAG_WRITE_THROUGH
@Define public static final int FILE_FLAG_WRITE_THROUGH
FILE_FLAG_WRITE_THROUGH Write operations will not go through any intermediate cache, they will go directly to disk.- See Also:
- Constant Field Values
-
FILE_SKIP_COMPLETION_PORT_ON_SUCCESS
@Define public static final byte FILE_SKIP_COMPLETION_PORT_ON_SUCCESS
FILE_SKIP_COMPLETION_PORT_ON_SUCCESS If some conditions are true, the I/O Manager does not queue a completion entry to the port, when it would ordinarily do so.- See Also:
- Constant Field Values
-
FILE_SKIP_SET_EVENT_ON_HANDLE
@Define public static final byte FILE_SKIP_SET_EVENT_ON_HANDLE
FILE_SKIP_SET_EVENT_ON_HANDLE The I/O Manager does not set the event for the file object if a request returns with a success code, or the error returned is ERROR_PENDING and the function that is called is not a synchronous function.- See Also:
- Constant Field Values
-
INFINITE
@Define public static final int INFINITE
- See Also:
- Constant Field Values
-
MARKPARITY
@Define public static final byte MARKPARITY
MARKPARITY Mark parity.- See Also:
- Constant Field Values
-
MS_CTS_ON
@Define public static final int MS_CTS_ON
MS_CTS_ON The CTS (clear-to-send) signal is on.- See Also:
- Constant Field Values
-
MS_DSR_ON
@Define public static final int MS_DSR_ON
MS_DSR_ON The DSR (data-set-ready) signal is on.- See Also:
- Constant Field Values
-
MS_RING_ON
@Define public static final int MS_RING_ON
MS_RING_ON The ring indicator signal is on.- See Also:
- Constant Field Values
-
MS_RLSD_ON
@Define public static final int MS_RLSD_ON
MS_RLSD_ON The RLSD (receive-line-signal-detect) signal is on.- See Also:
- Constant Field Values
-
NOPARITY
@Define public static final byte NOPARITY
NOPARITY No parity.- See Also:
- Constant Field Values
-
ODDPARITY
@Define public static final byte ODDPARITY
ODDPARITY Odd parity.- See Also:
- Constant Field Values
-
ONE5STOPBITS
@Define public static final byte ONE5STOPBITS
ONE5STOPBITS 1.5 stop bits.- See Also:
- Constant Field Values
-
ONESTOPBIT
@Define public static final byte ONESTOPBIT
ONESTOPBIT 1 stop bit.- See Also:
- Constant Field Values
-
RESETDEV
@Define public static final int RESETDEV
- See Also:
- Constant Field Values
-
RTS_CONTROL_DISABLE
@Define public static final byte RTS_CONTROL_DISABLE
RTS_CONTROL_DISABLE Disables the RTS line when the device is opened and leaves it disabled.- See Also:
- Constant Field Values
-
RTS_CONTROL_ENABLE
@Define public static final byte RTS_CONTROL_ENABLE
RTS_CONTROL_ENABLE Enables the RTS line when the device is opened and leaves it on.- See Also:
- Constant Field Values
-
RTS_CONTROL_HANDSHAKE
@Define public static final byte RTS_CONTROL_HANDSHAKE
RTS_CONTROL_HANDSHAKE Enables RTS handshaking.- See Also:
- Constant Field Values
-
RTS_CONTROL_TOGGLE
@Define public static final byte RTS_CONTROL_TOGGLE
RTS_CONTROL_TOGGLE Specifies that the RTS line will be high if bytes are available for transmission.- See Also:
- Constant Field Values
-
SECURITY_ANONYMOUS
@Define public static final int SECURITY_ANONYMOUS
SECURITY_ANONYMOUS Impersonates a client at the Anonymous impersonation level. Winnt.SecurityAnonymous << 16- See Also:
- Constant Field Values
-
SECURITY_CONTEXT_TRACKING
@Define public static final int SECURITY_CONTEXT_TRACKING
SECURITY_CONTEXT_TRACKING he security tracking mode is dynamic.- See Also:
- Constant Field Values
-
SECURITY_DELEGATION
@Define public static final int SECURITY_DELEGATION
SECURITY_DELEGATION Impersonates a client at the Delegation impersonation level. Winnt.SecurityDelegation << 16- See Also:
- Constant Field Values
-
SECURITY_EFFECTIVE_ONLY
@Define public static final int SECURITY_EFFECTIVE_ONLY
SECURITY_EFFECTIVE_ONLY Only the enabled aspects of the client's security context are available to the server.- See Also:
- Constant Field Values
-
SECURITY_IDENTIFICATION
@Define public static final int SECURITY_IDENTIFICATION
SECURITY_IDENTIFICATION Impersonates a client at the Identification impersonation level. Winnt.SecurityIdentification << 16- See Also:
- Constant Field Values
-
SECURITY_IMPERSONATION
@Define public static final int SECURITY_IMPERSONATION
SECURITY_IMPERSONATION Impersonate a client at the impersonation level. Winnt.SecurityImpersonation << 16- See Also:
- Constant Field Values
-
SETBREAK
@Define public static final int SETBREAK
SETBREAK Suspends character transmission and places the transmission line in a break state until the ClearCommBreak function is called (or EscapeCommFunction is called with the CLRBREAK extended function code).- See Also:
- Constant Field Values
-
SETDTR
@Define public static final int SETDTR
SETDTR Sends the DTR (data-terminal-ready) signal.- See Also:
- Constant Field Values
-
SETRTS
@Define public static final int SETRTS
SETRTS Sends the RTS (request-to-send) signal.- See Also:
- Constant Field Values
-
SETXOFF
@Define public static final int SETXOFF
SETXOFF Causes transmission to act as if an XOFF character has been received.- See Also:
- Constant Field Values
-
SETXON
@Define public static final int SETXON
SETXON Causes transmission to act as if an XON character has been received.- See Also:
- Constant Field Values
-
SPACEPARITY
@Define public static final byte SPACEPARITY
SPACEPARITY Space parity.- See Also:
- Constant Field Values
-
STD_ERROR_HANDLE
@Define public static final int STD_ERROR_HANDLE
STD_ERROR_HANDLE The standard error device. Initially, this is the active console screen buffer, CONOUT$.- See Also:
- Constant Field Values
-
STD_INPUT_HANDLE
@Define public static final int STD_INPUT_HANDLE
STD_INPUT_HANDLE The standard input device. Initially, this is the console input buffer, CONIN$.- See Also:
- Constant Field Values
-
STD_OUTPUT_HANDLE
@Define public static final int STD_OUTPUT_HANDLE
STD_OUTPUT_HANDLE The standard output device. Initially, this is the active console screen buffer, CONOUT$.- See Also:
- Constant Field Values
-
TWOSTOPBITS
@Define public static final byte TWOSTOPBITS
TWOSTOPBITS 2 stop bits.- See Also:
- Constant Field Values
-
WAIT_ABANDONED
@Define public static final int WAIT_ABANDONED
- See Also:
- Constant Field Values
-
WAIT_FAILED
@Define public static final int WAIT_FAILED
WAIT_FAILED The specified object is a mutex object that was not released by the thread that owned the mutex object before the owning thread terminated. The function has failed. To get extended error information, call GetLastError.
This is usually done in the native code which throws a NativeErrorExcepotion instead of passing this back.- See Also:
- Constant Field Values
-
WAIT_IO_COMPLETION
@Define public static final int WAIT_IO_COMPLETION
WAIT_IO_COMPLETION The state of the specified object is signaled.- See Also:
- Constant Field Values
-
WAIT_OBJECT_0
@Define public static final int WAIT_OBJECT_0
WAIT_OBJECT_0 The state of the specified object is signaled.- See Also:
- Constant Field Values
-
-
Method Detail
-
BindIoCompletionCallback
public static final void BindIoCompletionCallback(Winnt.HANDLE FileHandle, Minwinbase.LPOVERLAPPED_COMPLETION_ROUTINE Function, int Flags) throws NativeErrorException
* BindIoCompletionCallback Associates the I/O completion port owned by the thread pool with the specified file handle.- Parameters:
FileHandle-Function-Flags-- Throws:
NativeErrorException- if the return value of the native function indicates an error.
-
ClearCommBreak
public static final void ClearCommBreak(Winnt.HANDLE hFile) throws NativeErrorException
ClearCommBreak Restores character transmission for a specified communications device and places the transmission line in a nonbreak state.- Parameters:
hFile- a handle to the communications device.- Throws:
NullPointerException- if hFile isnull.NativeErrorException- if the return value of the native function indicates an error.
-
ClearCommError
public static final void ClearCommError(Winnt.HANDLE hFile, Int32_t lpErrors, Winbase.COMSTAT lpStat) throws NativeErrorException
ClearCommError Retrieves information about a communications error and reports the current status of a communications device.- Parameters:
hFile- a handle to the communications device.lpErrors- A pointer to a variable that receives a mask indicating the type of error. This parameter can be one or more of the following values:CE_BREAK,CE_FRAME,CE_OVERRUN,CE_RXOVER,CE_RXPARITY.lpStat- A pointer to aWinbase.COMSTATstructure in which the device's status information is returned. If this parameter isNULL, no status information is returned.- Throws:
NullPointerException- if hFile isnull.NativeErrorException- if the return value of the native function indicates an error.
-
EscapeCommFunction
public static final void EscapeCommFunction(Winnt.HANDLE hFile, int dwFunc) throws NativeErrorException
EscapeCommFunction Directs the specified communications device to perform an extended function.- Parameters:
hFile- a handle to the communications device.dwFunc- The extended function to be performed. This parameter can be one of the following values:CLRBREAK,CLRDTR,CLRRTS,SETBREAK,SETDTR,SETRTS,SETXOFF,SETXON.- Throws:
NullPointerException- if hFile isnull.NativeErrorException- if the return value of the native function indicates an error.
-
GetCommModemStatus
public static final void GetCommModemStatus(Winnt.HANDLE hFile, Int32_t lpModemStat) throws NativeErrorException
GetCommModemStatus Directs the specified communications device to perform an extended function.- Parameters:
hFile- a handle to the communications device.lpModemStat- The extended function to be performed. This parameter can be one of the following values: MS_CTS_ON MS_DSR_ON MS_RING_ON MS_RLSD_ON- Throws:
NullPointerException- if hFile isnull.NativeErrorException- if the return value of the native function indicates an error.
-
GetCommState
public static final void GetCommState(Winnt.HANDLE hFile, Winbase.DCB lpDCB) throws NativeErrorException
GetCommState Retrieves the current control settings for a specified communications device.- Parameters:
hFile- a handle to the communications device.lpDCB- A pointer to aWinbase.DCBstructure that receives the control settings information.- Throws:
NullPointerException- if hFile or lpDCB isnull.NativeErrorException- if the return value of the native function indicates an error.
-
GetCommTimeouts
public static final void GetCommTimeouts(Winnt.HANDLE hFile, Winbase.COMMTIMEOUTS lpCommTimeouts) throws NativeErrorException
GetCommTimeouts Retrieves the time-out parameters for all read and write operations on a specified communications device.- Parameters:
hFile- a handle to the communications device.lpCommTimeouts- a pointer to aWinbase.COMMTIMEOUTSstructure in which the time-out information is returned.- Throws:
NullPointerException- if hFile or lpCommTimeouts isnull.NativeErrorException- if the return value of the native function indicates an error.
-
SetCommBreak
public static final void SetCommBreak(Winnt.HANDLE hFile) throws NativeErrorException
SetCommBreak Suspends character transmission for a specified communications device and places the transmission line in a break state until the ClearCommBreak function is called.- Parameters:
hFile- a handle to the communications device.- Throws:
NullPointerException- if hFile isnull.NativeErrorException- if the return value of the native function indicates an error.
-
SetCommState
public static final void SetCommState(Winnt.HANDLE hFile, Winbase.DCB lpDCB) throws NativeErrorException
SetCommState Configures a communications device according to the specifications in a device-control block (aWinbase.DCBstructure).- Parameters:
hFile- a handle to the communications device.lpDCB- a pointer to aWinbase.DCBstructure that contains the configuration information for the specified communications device.- Throws:
NullPointerException- if hFile or lpDCB isnull.NativeErrorException- if the return value of the native function indicates an error.
-
SetCommTimeouts
public static final void SetCommTimeouts(Winnt.HANDLE hFile, Winbase.COMMTIMEOUTS lpCommTimeouts) throws NativeErrorException
SetCommTimeouts Sets the time-out parameters for all read and write operations on a specified communications device.- Parameters:
hFile- a handle to the communications device.lpCommTimeouts- a pointer to aWinbase.COMMTIMEOUTSstructure that contains the new time-out values.- Throws:
NullPointerException- if hFile or lpCommTimeouts isnull.NativeErrorException- if the return value of the native function indicates an error.
-
SetFileCompletionNotificationModes
public static final void SetFileCompletionNotificationModes(Winnt.HANDLE hFile, byte uFlags) throws NativeErrorException
SetFileCompletionNotificationModes Sets the notification modes for a file handle, allowing you to specify how completion notifications work for the specified file.- Parameters:
hFile-uFlags-- Throws:
NativeErrorException- if the return value of the native function indicates an error.
-
-