Solved

Detect cdrom drive letter

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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 The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 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

22 Experts available now in Live!

Get 1:1 Help Now