Solved

How to access to CD-ROM Tracks ?

Posted on 1999-01-13
3
286 Views
Last Modified: 2010-04-06
  I like access in Delphi OR C++ to CD-ROM tracks to
get it values in memory. Only, I need the function to get sectors from an CDAudio. I find that then function DeviceIOControl can do it, but the command IOCTL_CDROM_RAW_READ are not implemented.
  My question is, ¿What is the number of IOCTL_CDROM_RAW_READ ?.
0
Comment
Question by:rmfboot
3 Comments
 
LVL 20

Expert Comment

by:Madshi
ID: 1356340
Hmm. I looked through the Microsoft MSDN CDs and I found the word "IOCTL_CDROM_RAW_READ", but I didn't found the number anywhere...   :-(

Regards, Madshi.
0
 
LVL 44

Expert Comment

by:bruintje
ID: 1356341
Hi rmfboot,

Saw this in the MMSystem unit  

MMIO_RWMODE     = $00000003;      { open file for reading/writing/both }

And I think you can find everything you need right there, about constants and device types. And at the Inprise site there's a faq that handles current track selection and playtime.

http://www.inprise.com/devsupport/delphi/qanda/FAQ2083D.html

Hope this helps you any further
:O)
brUINTje.
0
 
LVL 2

Accepted Solution

by:
ivi earned 200 total points
ID: 1356342
In NTDDCDRM.H:

#define IOCTL_CDROM_RAW_READ         CTL_CODE(IOCTL_CDROM_BASE, 0x000F, METHOD_OUT_DIRECT,  FILE_READ_ACCESS)

In NTDDK.H:

#define FILE_DEVICE_CD_ROM    0x00000002
#define IOCTL_CDROM_BASE      FILE_DEVICE_CD_ROM
#define METHOD_OUT_DIRECT     2
#define FILE_READ_ACCESS      ( 0x0001 )    // file & pipe
#define CTL_CODE(DeviceType,Function,Method,Access) \   ((DeviceType) << 16)|((Access)<<14)|((Function)<<2)|(Method))

Translated to Delphi:

const IOCTL_CDROM_RAW_READ = $0002403E


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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

863 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

28 Experts available now in Live!

Get 1:1 Help Now