Link to home
Start Free TrialLog in
Avatar of sundayboys
sundayboys

asked on

true CD-ROM???

How can I find the CD-ROM register in system is a true CD-ROM,not Virtual CD-ROM.


this pts is my all pts.
Avatar of pin_plunder
pin_plunder

maybe this helps
procedure TForm1.Button1Click(Sender: TObject);
var
   s : String;
begin
  s:=edit1.Text;
  setlength(s,1);
  if GetDriveType(Pchar(s)) <> DRIVE_REMOTE then
     edit1.Text:=Volumeid(s[1])
  else
    edit1.Text:=NetworkVolume(s[1]);
  S:=S+#58+#92;
  Setlength(s,3);
  case GetDriveType(Pchar(s)) of
       0:                edit2.Text:='drive type cannot be determined.';
       1 :               edit2.Text:='root directory does not exist.';
       DRIVE_REMOVABLE:  edit2.Text:='drive can be removed from the drive.';
       DRIVE_FIXED:      edit2.Text:='disk cannot be removed from the drive.';
       DRIVE_REMOTE: edit2.Text:='drive is a remote (network) drive.';
       DRIVE_CDROM: edit2.Text:='drive is a CD-ROM drive.';
       DRIVE_RAMDISK:    edit2.Text:='drive is a RAM disk.';
  end;
end;
listening :-)
You can measure the speed of reading one (large) continues file and speed of reading large amount of little files... For real CD it should take more time in second case... :) But good virtual CD will do the same...
Avatar of sundayboys

ASKER

i know it must use aspi,who can give me a example.
ASKER CERTIFIED SOLUTION
Avatar of Madshi
Madshi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can check for that , not using ASPI , but you need to develop a small Driver , which checks the Driver object of CD driver , then checks hardware claimed then checks real IRQ range etc. A driver of virtual Drive will not have hardware (CDROM DRIVE) assigned to him.

YOu need to explore the topic on yourself.I cant give every detail. See DDK docs + samples of class driver of CDROM.