C# Класс SharpBoot.DriveAccess

Наследование: IDisposable
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
driveStream System.IO.FileStream

Защищенные свойства (Protected)

Свойство Тип Описание
driveGeometry DriveGeometry
driveHandle SafeFileHandle

Открытые методы

Метод Описание
Dispose ( ) : void
DriveAccess ( string Path ) : System
GetAllDrives ( string DeviceName ) : List

Returns a list of all Drives on the mahine

ReadSectors ( System.UInt64 startSector, System.UInt64 sectorCount, byte Buffer, int offset ) : int

Reads a number of sectors from the opened drive

WriteSectors ( System.UInt64 startSector, System.UInt64 sectorCount, byte Buffer, int offset ) : void

Writes a number of sectors on the opened drive (Untested!!!)

Приватные методы

Метод Описание
CreateFile ( string lpFileName, UInt32 dwDesiredAccess, UInt32 dwShareMode, IntPtr pSecurityAttributes, UInt32 dwCreationDisposition, UInt32 dwFlagsAndAttributes, IntPtr hTemplateFile ) : SafeFileHandle
DeviceIoControl ( IntPtr hDevice, uint dwIoControlCode, IntPtr lpInBuffer, uint nInBufferSize, IntPtr lpOutBuffer, uint nOutBufferSize, uint &lpBytesReturned, IntPtr lpOverlapped ) : bool
QueryDosDevice ( string DeviceName, IntPtr TargetPath, UInt32 ucchMax ) : UInt32

Описание методов

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

DriveAccess() публичный Метод

public DriveAccess ( string Path ) : System
Path string
Результат System

GetAllDrives() публичный статический Метод

Returns a list of all Drives on the mahine
public static GetAllDrives ( string DeviceName ) : List
DeviceName string Can be null
Результат List

ReadSectors() публичный Метод

Reads a number of sectors from the opened drive
public ReadSectors ( System.UInt64 startSector, System.UInt64 sectorCount, byte Buffer, int offset ) : int
startSector System.UInt64 Address of the start sector
sectorCount System.UInt64 Number of sectors to read
Buffer byte The buffer to put data in
offset int Offset of data ub the buffer
Результат int

WriteSectors() публичный Метод

Writes a number of sectors on the opened drive (Untested!!!)
public WriteSectors ( System.UInt64 startSector, System.UInt64 sectorCount, byte Buffer, int offset ) : void
startSector System.UInt64 Address of the start sector
sectorCount System.UInt64 Number of sectors to write
Buffer byte The buffer the data is taken from
offset int Offset of data in the buffer
Результат void

Описание свойств

driveGeometry защищенное свойство

protected DriveGeometry driveGeometry
Результат DriveGeometry

driveHandle защищенное свойство

protected SafeFileHandle driveHandle
Результат SafeFileHandle

driveStream публичное свойство

public FileStream,System.IO driveStream
Результат System.IO.FileStream