C# 클래스 TrueLib.SystemDevices

Static wrapper for windows system devices.
파일 보기 프로젝트 열기: nefarius/TrueMount-3

공개 메소드들

메소드 설명
GetDiskDriveBySignature ( String caption, uint signature ) : System.Management.ManagementObject

Gets a device with given caption and signature.

GetDiskSignatureFromLetter ( String letter, string &caption, uint &signature, uint &partitionNr ) : void

Gets the disk caption, signature and partition number by the drive letter.

GetDriveLetterBySignature ( String caption, uint signature, uint partitionNr ) : String

Gets the drive letter of a logical disk identified by its caption, signature and partition number.

GetLocalDiskPartitions ( ) : List

For debugging: returns identity information about all attached disks.

GetLogicalDisk ( String letter, int drive_type = 3 ) : System.Management.ManagementObject

Gets a logical disk by a drive letter an disk type.

GetPartitionByIndex ( uint DiskIndex, uint Index ) : System.Management.ManagementObject

Gets a partition by its disk index and partition index.

GetPartitionBySignature ( String caption, uint signature, uint partitionNr ) : System.Management.ManagementObject

Gets a partition with a given drive signature and partition index.

GetTCCompatibleDiskPath ( uint index ) : string

Returns a TC compatible path to an encrypted hard disk.

GetTCCompatibleName ( String deviceid ) : String

Converts the device id into a TrueCrypt compatible path.

IsDiskOnline ( string caption, uint signature ) : bool

Checks if a given disk is online.

IsLogicalDiskOnline ( String letter, int type = 2 ) : bool

Checks if logical device is online (=plugged in and mounted with drive letter).

IsPartitionOnline ( string caption, uint signature, uint partitionIndex ) : bool

Checks if a given disk drive partition is online.

IsRemovablePartition ( string deviceId ) : bool

Checks if a partition with given DeviceID is removable.

비공개 메소드들

메소드 설명
ReplaceEvaluator ( Match m ) : string

Contains logic to build a TC compatible device path.

메소드 상세

GetDiskDriveBySignature() 공개 정적인 메소드

Gets a device with given caption and signature.
public static GetDiskDriveBySignature ( String caption, uint signature ) : System.Management.ManagementObject
caption String Caption (title, name) of the device.
signature uint Signature (10 digit unsigned integer) of the device. May be 0 in some cases.
리턴 System.Management.ManagementObject

GetDiskSignatureFromLetter() 공개 정적인 메소드

Gets the disk caption, signature and partition number by the drive letter.
public static GetDiskSignatureFromLetter ( String letter, string &caption, uint &signature, uint &partitionNr ) : void
letter String Drive letter of the logical disk.
caption string Caption of the disk.
signature uint Signature of the disk.
partitionNr uint Partition number (zero based).
리턴 void

GetDriveLetterBySignature() 공개 정적인 메소드

Gets the drive letter of a logical disk identified by its caption, signature and partition number.
public static GetDriveLetterBySignature ( String caption, uint signature, uint partitionNr ) : String
caption String Caption (title, name) of the disk.
signature uint Signature (10 digit unsigned integer) of the disk.
partitionNr uint Partition number (zero based).
리턴 String

GetLocalDiskPartitions() 공개 정적인 메소드

For debugging: returns identity information about all attached disks.
public static GetLocalDiskPartitions ( ) : List
리턴 List

GetLogicalDisk() 공개 정적인 메소드

Gets a logical disk by a drive letter an disk type.
public static GetLogicalDisk ( String letter, int drive_type = 3 ) : System.Management.ManagementObject
letter String Drive letter of the disk.
drive_type int Optional drive type (3 = local, 2 = removable).
리턴 System.Management.ManagementObject

GetPartitionByIndex() 공개 정적인 메소드

Gets a partition by its disk index and partition index.
public static GetPartitionByIndex ( uint DiskIndex, uint Index ) : System.Management.ManagementObject
DiskIndex uint Disk index (zero based).
Index uint Partition index (zero based).
리턴 System.Management.ManagementObject

GetPartitionBySignature() 공개 정적인 메소드

Gets a partition with a given drive signature and partition index.
public static GetPartitionBySignature ( String caption, uint signature, uint partitionNr ) : System.Management.ManagementObject
caption String The disk drive caption.
signature uint The disk drive signature.
partitionNr uint The zero-based partition number.
리턴 System.Management.ManagementObject

GetTCCompatibleDiskPath() 공개 정적인 메소드

Returns a TC compatible path to an encrypted hard disk.
public static GetTCCompatibleDiskPath ( uint index ) : string
index uint
리턴 string

GetTCCompatibleName() 공개 정적인 메소드

Converts the device id into a TrueCrypt compatible path.
public static GetTCCompatibleName ( String deviceid ) : String
deviceid String Device ID
리턴 String

IsDiskOnline() 공개 정적인 메소드

Checks if a given disk is online.
public static IsDiskOnline ( string caption, uint signature ) : bool
caption string The caption of the disk drive.
signature uint The signature of the disk drive.
리턴 bool

IsLogicalDiskOnline() 공개 정적인 메소드

Checks if logical device is online (=plugged in and mounted with drive letter).
public static IsLogicalDiskOnline ( String letter, int type = 2 ) : bool
letter String Drive letter of the device.
type int
리턴 bool

IsPartitionOnline() 공개 정적인 메소드

Checks if a given disk drive partition is online.
public static IsPartitionOnline ( string caption, uint signature, uint partitionIndex ) : bool
caption string The caption of the disk drive.
signature uint The signature of the disk drive.
partitionIndex uint The zero-based partition index.
리턴 bool

IsRemovablePartition() 공개 정적인 메소드

Checks if a partition with given DeviceID is removable.
public static IsRemovablePartition ( string deviceId ) : bool
deviceId string The disk partition DeviceID.
리턴 bool