Esempio n. 1
0
 public static extern int DeviceIoControl(
     FileSafeHandle device,
     IoControlCode dwIoControlCode,
     IntPtr inBuffer,
     int inBufferSize,
     IntPtr outBuffer,
     uint outBufferSize,
     ref uint bytesReturned,
     IntPtr overlapped
     );
Esempio n. 2
0
 public static extern Boolean DeviceIoControl(
     FileSafeHandle hDevice,
     IoControlCode dwIoControlCode,
     ref DRIVE_LAYOUT_INFORMATION_EX lpInBuffer,
     int nInBufferSize,
     IntPtr lpOutBuffer,
     Int32 nOutBufferSize,
     ref Int32 lpBytesReturned,
     IntPtr lpOverlapped
     );
Esempio n. 3
0
 public static extern Boolean DeviceIoControl(
     FileSafeHandle hDevice,
     IoControlCode dwIoControlCode,
     ref GrowPartition lpInBuffer,
     int nInBufferSize,
     IntPtr lpOutBuffer,
     Int32 nOutBufferSize,
     ref Int32 lpBytesReturned,
     IntPtr lpOverlapped
     );
Esempio n. 4
0
 public DriveLayout(string diskName)
 {
     ExecuteNativeActionAndCheckLastError(() =>
     {
         handle = NativeMethods.CreateFile(
             diskName,
             NativeMethods.AccessRights.GENERIC_READ,
             0, IntPtr.Zero,
             NativeMethods.FileCreationDisposition.OPEN_EXISTING,
             0, IntPtr.Zero
             );
     });
 }
Esempio n. 5
0
 public static extern Boolean ReadFile(FileSafeHandle hFile, Byte[] lpBuffer, UInt32 nNumberOfBytesToRead, ref UInt32 lpNumberOfBytesRead, ref NativeOverlapped lpOverlapped);
Esempio n. 6
0
 public static extern Boolean PeekNamedPipe(FileSafeHandle hNamedPipe, Byte[] lpBuffer, UInt32 nBufferSize, ref UInt32 lpBytesRead, ref UInt32 lpTotalBytesAvail, ref UInt32 lpBytesLeftThisMessage);
Esempio n. 7
0
 public static extern Boolean FlushFileBuffers(FileSafeHandle hNamedPipe);
Esempio n. 8
0
 public static extern Boolean DisconnectNamedPipe(FileSafeHandle hNamedPipe);
Esempio n. 9
0
 public static extern Boolean ConnectNamedPipe(FileSafeHandle hNamedPipe, IntPtr lpOverlapped);
Esempio n. 10
0
 public static extern Boolean ConnectNamedPipe(FileSafeHandle hNamedPipe, IntPtr lpOverlapped);
Esempio n. 11
0
 public static extern Boolean WriteFile(FileSafeHandle hFile, Byte[] lpBuffer, UInt32 nNumberOfBytesToWrite, ref UInt32 lpNumberOfBytesWritten, ref NativeOverlapped lpOverlapped);
Esempio n. 12
0
 public static extern Boolean ReadFile(FileSafeHandle hFile, Byte[] lpBuffer, UInt32 nNumberOfBytesToRead, ref UInt32 lpNumberOfBytesRead, ref NativeOverlapped lpOverlapped);
Esempio n. 13
0
 public static extern Boolean PeekNamedPipe(FileSafeHandle hNamedPipe, Byte[] lpBuffer, UInt32 nBufferSize, ref UInt32 lpBytesRead, ref UInt32 lpTotalBytesAvail, ref UInt32 lpBytesLeftThisMessage);
Esempio n. 14
0
 public static extern Boolean FlushFileBuffers(FileSafeHandle hNamedPipe);
Esempio n. 15
0
 public static extern Boolean DisconnectNamedPipe(FileSafeHandle hNamedPipe);
Esempio n. 16
0
 public static extern Boolean WriteFile(FileSafeHandle hFile, Byte[] lpBuffer, UInt32 nNumberOfBytesToWrite, ref UInt32 lpNumberOfBytesWritten, ref NativeOverlapped lpOverlapped);
Esempio n. 17
0
 public static extern bool WriteFile(FileSafeHandle hFile, byte[] lpBuffer, uint nNumberOfBytesToWrite, ref uint lpNumberOfBytesWritten, ref NativeOverlapped lpOverlapped);
Esempio n. 18
0
 public static extern bool WriteFile(FileSafeHandle hFile, byte[] lpBuffer, uint nNumberOfBytesToWrite, ref uint lpNumberOfBytesWritten, ref NativeOverlapped lpOverlapped);