- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
- {-----------------------------------------------------------------------------
- Unit Name: DeviceInfo
- Author: Paul Fisher / Andrew Semack
- Purpose: Class to store device information
- History:
- -----------------------------------------------------------------------------}
- unit DeviceInfo;
- interface
- uses
- Windows, DeviceTypes, Classes, SysUtils;
- type
- TDeviceInfo = class
- private
- FInfoRecord: PCDBurnerInfo;
- function GetDriveID: DWORD;
- function GetDriveIndex: Integer;
- function GetDriveLetter: Char;
- function GetHaId: Byte;
- function GetLun: Byte;
- function GetProductID: string;
- function GetRevision: string;
- function GetSptiHandle: THandle;
- function GetTarget: Byte;
- function GetVendorID: string;
- function GetVendorName: string;
- function GetVendorSpec: string;
- function GetDriveName: string;
- public
- property DriveIndex: Integer read GetDriveIndex;
- property DriveLetter: Char read GetDriveLetter;
- property DriveName: string read GetDriveName;
- property DriveID: DWORD read GetDriveID;
- property ProductID: string read GetProductID;
- property VendorID: string read GetVendorID;
- property VendorName: string read GetVendorName;
- property VendorSpec: string read GetVendorSpec;
- property Revision: string read GetRevision;
- property SptiHandle: THandle read GetSptiHandle;
- property HaId: Byte read GetHaId;
- property Target: Byte read GetTarget;
- property Lun: Byte read GetLun;
- constructor Create(InfoRecord: PCDBurnerInfo);
- end;
- implementation
- { TInfoRecord }
- constructor TDeviceInfo.Create(InfoRecord: PCDBurnerInfo);
- begin
- FInfoRecord := InfoRecord;
- end;
- function TDeviceInfo.GetDriveIndex: Integer;
- begin
- Result := FInfoRecord.DriveIndex;
- end;
- function TDeviceInfo.GetDriveLetter: Char;
- begin
- Result := FInfoRecord.DriveLetter;
- end;
- function TDeviceInfo.GetRevision: string;
- begin
- Result := FInfoRecord.Revision;
- end;
- function TDeviceInfo.GetVendorID: string;
- begin
- Result := FInfoRecord.VendorID;
- end;
- function TDeviceInfo.GetLun: Byte;
- begin
- Result := FInfoRecord.Lun;
- end;
- function TDeviceInfo.GetProductID: string;
- begin
- Result := FInfoRecord.ProductID;
- end;
- function TDeviceInfo.GetTarget: Byte;
- begin
- Result := FInfoRecord.Target;
- end;
- function TDeviceInfo.GetVendorName: string;
- begin
- Result := FInfoRecord.VendorName;
- end;
- function TDeviceInfo.GetHaId: Byte;
- begin
- Result := FInfoRecord.HaId;
- end;
- function TDeviceInfo.GetVendorSpec: string;
- begin
- Result := FInfoRecord.VendorSpec;
- end;
- function TDeviceInfo.GetSptiHandle: THandle;
- begin
- Result := FInfoRecord.SptiHandle;
- end;
- function TDeviceInfo.GetDriveID: DWORD;
- begin
- Result := FInfoRecord.DriveID;
- end;
- function TDeviceInfo.GetDriveName: string;
- begin
- Result := Format('%s:', [FInfoRecord.DriveLetter]);
- end;
- end.