[ASK] How to distinguish cd/dvd type via Delphi

delphifocus
delphifocus used Ask the Experts™
on
How to distinguish the type of optical drive through delphi programming? What the diversiform slimtype whether or not it?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
This is a tough question for just 125...
the GetLogicalDriveStrings() and GetDriveType() functions in the
Win32 API.

However, you will not be able to use the Win32 API to differentiate between
CD and DVD. Some DVD drives return DEVICE_CDROM from GetDeviceType(), for
instance. The only way to know if the drive is actually a CD-ROM, CD-R,
CD-RW, DVD+-R, DVD+-RW, DVD-RAM, etc is to query the hardware directly,
using the Win32 API DeviceIoControl() function to exchange SCSI
commands/replies with the hardware. The MMC (MultiMedia Commands) specs are
available for free download at http://www.t10.org.


But here it is
You need this example:

http://forums.devshed.com/attachment.php?attachmentid=5429

and jedi api library

http://sourceforge.net/projects/jedi-apilib/

Author

Commented:
Thank you had answer my question but I want answer of this question: "How can I know the type of optical drive, is that "Slimline"  type (usually come with notebook / laptop) or another type?"

Regards
delphifocus

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial