Class Ioapiset


  • @Include("ioapiset.h")
    public final class Ioapiset
    extends Object
    Wrapper around the ioapiset.h header.
    Author:
    aploese
    • Field Detail

      • HAVE_IOAPISET_H

        public static final boolean HAVE_IOAPISET_H
    • Constructor Detail

      • Ioapiset

        public Ioapiset()
    • Method Detail

      • GetOverlappedResult

        public static 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 an Minwinbase.OVERLAPPED data 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 throws a NativeErrorException with ERROR_IO_INCOMPLETE as errno.
        Returns:
        lpNumberOfBytesTransferred of the native call.
        Throws:
        NullPointerException - if hFile or lpBuffer or lpOverlapped is null.
        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 of ByteBuffer is also updated.
        Parameters:
        hFile - a handle to the file, named pipe, or communications device.
        lpBuffer - a pointer to the ByteBuffer that used for IO and which position must be updated.
        lpOverlapped - a pointer to an Minwinbase.OVERLAPPED data 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 is null.
        ArrayIndexOutOfBoundsException - if pos and len are outside of lpBuffer.
        NativeErrorException - if the return value of the native function indicates an error.