Solved

Detect cdrom drive letter

Posted on 1999-01-13
3
137 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PDF library for Delphi 2 104
Best Firemonkey component pack 1 86
Delphi - replicating a form 8 62
When I am typing into a TEdit last word repeats 7 117
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now