Exemplo n.º 1
0
 public static bool GetOverlappedResult(SafeFileHandle file, SafeOverlapped overlapped, out int numberOfBytesTransferred, bool wait)
 {
     return(NativeMethods.GetOverlappedResult(file, overlapped.PinnedHandle, out numberOfBytesTransferred, wait));
 }
Exemplo n.º 2
0
        public static bool WriteAsync(SafeFileHandle file, IntPtr buffer, int numberOfBytesToWrite, SafeOverlapped overlapped)
        {
            int unused = 0;

            return(WriteAsync(file, buffer, numberOfBytesToWrite, ref unused, overlapped));
        }
Exemplo n.º 3
0
 public static bool WriteAsync(SafeFileHandle file, IntPtr buffer, int numberOfBytesToWrite, ref int numberOfBytesWritten, SafeOverlapped overlapped)
 {
     return(NativeMethods.WriteFile(file, buffer, numberOfBytesToWrite, ref numberOfBytesWritten, overlapped.PinnedHandle));
 }
Exemplo n.º 4
0
 public static bool ReadAsync(SafeFileHandle file, IntPtr buffer, int numberOfBytesToRead, ref int numberOfBytesRead, SafeOverlapped overlapped)
 {
     return(NativeMethods.ReadFile(file, buffer, numberOfBytesToRead, ref numberOfBytesRead, overlapped.PinnedHandle));
 }