- java.lang.Object
-
- de.ibapl.jnhw.winapi.Ioapiset
-
@Include("ioapiset.h") public final class Ioapiset extends Object
Wrapper around the ioapiset.h header.- Author:
- aploese
-
-
Constructor Summary
Constructors Constructor Description Ioapiset()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidCancelIo(Winnt.HANDLE hFile)CancelIo Marks any outstanding I/O operations for the specified file handle.static voidCancelIoEx(Winnt.HANDLE hFile, Minwinbase.OVERLAPPED lpOverlapped)CancelIoEx Marks any outstanding I/O operations for the specified file handle.static intDeviceIoControl(Winnt.HANDLE hDevice, int dwIoControlCode, OpaqueMemory32 lpInBuffer, OpaqueMemory32 lpOutBuffer, Minwinbase.OVERLAPPED lpOverlapped)DeviceIoControl Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.static intGetOverlappedResult(Winnt.HANDLE hFile, Minwinbase.OVERLAPPED lpOverlapped, boolean bWait)GetOverlappedResult retrieves the results of an overlapped operation on the specified file, named pipe, or communications device.static intGetOverlappedResult(Winnt.HANDLE hFile, Minwinbase.OVERLAPPED lpOverlapped, ByteBuffer lpBuffer, boolean bWait)GetOverlappedResult retrieves the results of an overlapped operation on the specified file, named pipe, or communications device.
-
-
-
Method Detail
-
CancelIo
public static final void CancelIo(Winnt.HANDLE hFile) throws NativeErrorException
CancelIo Marks any outstanding I/O operations for the specified file handle.- Parameters:
hFile- a handle to the file, named pipe, or communications device.- Throws:
NullPointerException- if hFile isnull.NativeErrorException- if the return value of the native function indicates an error.
-
CancelIoEx
public static final void CancelIoEx(Winnt.HANDLE hFile, Minwinbase.OVERLAPPED lpOverlapped) throws NativeErrorException
CancelIoEx Marks any outstanding I/O operations for the specified file handle.- Parameters:
hFile- a handle to the file, named pipe, or communications device.lpOverlapped- a pointer to anMinwinbase.OVERLAPPEDdata structure that contains the data used for asynchronous I/O.- Throws:
NullPointerException- if hFile or lpOverlapped isnull.NativeErrorException- if the return value of the native function indicates an error.
-
DeviceIoControl
public static final int DeviceIoControl(Winnt.HANDLE hDevice, int dwIoControlCode, OpaqueMemory32 lpInBuffer, OpaqueMemory32 lpOutBuffer, Minwinbase.OVERLAPPED lpOverlapped) throws NativeErrorException
DeviceIoControl Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.- Returns:
- the value of lpBytesReturned.
- Throws:
NullPointerException- if hDevice or lpInBuffer or lpOutBuffer isnull.ArrayIndexOutOfBoundsException- if nInBufferOffset or nInBufferSize or nOutBufferOffset are nOutBufferSize outside of lpInBuffer resp lpOutBuffer.NativeErrorException- if the return value of the native function indicates an error.
-
GetOverlappedResult
public static final int GetOverlappedResult(Winnt.HANDLE hFile, Minwinbase.OVERLAPPED lpOverlapped, boolean bWait) throws NativeErrorException
GetOverlappedResult retrieves the results of an overlapped operation on the specified file, named pipe, or communications device.- Parameters:
hFile- a handle to the file, named pipe, or communications device.lpOverlapped- a pointer to anMinwinbase.OVERLAPPEDdata structure that contains the data used for asynchronous I/O.bWait- If this parameter isTRUE, and the Internal member of the lpOverlapped structure is STATUS_PENDING, the function does not return until the operation has been completed. If this parameter isFALSEand the operation is still pending, the function throws a NativeErrorException withERROR_IO_INCOMPLETEas errno.- Returns:
- lpNumberOfBytesTransferred of the native call.
- Throws:
NullPointerException- if hFile or lpBuffer or lpOverlapped isnull.NativeErrorException- if the return value of the native function indicates an error.
-
GetOverlappedResult
public static final int GetOverlappedResult(Winnt.HANDLE hFile, Minwinbase.OVERLAPPED lpOverlapped, ByteBuffer lpBuffer, boolean bWait) throws NativeErrorException
GetOverlappedResult retrieves the results of an overlapped operation on the specified file, named pipe, or communications device.
The position ofByteBufferis also updated.- Parameters:
hFile- a handle to the file, named pipe, or communications device.lpBuffer- a pointer to theByteBufferthat used for IO and which position must be updated.lpOverlapped- a pointer to anMinwinbase.OVERLAPPEDdata structure that contains the data used for asynchronous I/O.bWait- If this parameter is TRUE, and the Internal member of the lpOverlapped structure is STATUS_PENDING, the function does not return until the operation has been completed. If this parameter is FALSE and the operation is still pending, the function returns FALSE and the GetLastError function returns ERROR_IO_INCOMPLETE.- Returns:
- lpNumberOfBytesTransferred of the native call.
- Throws:
NullPointerException- if hFile or lpBuffer isnull.ArrayIndexOutOfBoundsException- if pos and len are outside of lpBuffer.NativeErrorException- if the return value of the native function indicates an error.
-
-