Solved

Detect cdrom drive letter

Posted on 1999-01-13
3
138 Views
Last Modified: 2010-04-04
How can I see what the drive letter from the first cdromplayer is?

Thanks
Vincent
0
Comment
Question by:Vincentg
  • 2
3 Comments
 

Author Comment

by:Vincentg
ID: 1356343
Edited text of question
0
 
LVL 20

Accepted Solution

by:
Madshi earned 10 total points
ID: 1356344
Vincent,

use this function:

function TellMeFirstCDRom : char;
var c1 : cardinal;
begin
  c1:=GetLogicalDrives;
  for result:='A' to 'Z' do
    if odd(c1 shr (ord(result)-ord('A'))) then begin
      if GetDriveType(PChar(result+':\'))=DRIVE_CDROM then
        exit;
  result:=#0;
end;

Regards, Madshi.
0
 

Author Comment

by:Vincentg
ID: 1356345
Thanks a lot Madshi....
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Correct Component for Shopping Cart. 2 105
Reconfigure Delphi Install? 2 51
Create a path if not exists 7 78
Dynamically Created Query 3 56
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question