C# Class SharpBoot.DriveAccess

Inheritance: IDisposable
Afficher le fichier Open project: zdimension/SharpBoot

Méthodes publiques

Свойство Type Description
driveStream System.IO.FileStream

Protected Properties

Свойство Type Description
driveGeometry DriveGeometry
driveHandle SafeFileHandle

Méthodes publiques

Méthode Description
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!!!)

Private Methods

Méthode Description
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

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

DriveAccess() public méthode

public DriveAccess ( string Path ) : System
Path string
Résultat System

GetAllDrives() public static méthode

Returns a list of all Drives on the mahine
public static GetAllDrives ( string DeviceName ) : List
DeviceName string Can be null
Résultat List

ReadSectors() public méthode

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
Résultat int

WriteSectors() public méthode

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
Résultat void

Property Details

driveGeometry protected_oe property

protected DriveGeometry driveGeometry
Résultat DriveGeometry

driveHandle protected_oe property

protected SafeFileHandle driveHandle
Résultat SafeFileHandle

driveStream public_oe property

public FileStream,System.IO driveStream
Résultat System.IO.FileStream