Solved

How to access to CD-ROM Tracks ?

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

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

21 Experts available now in Live!

Get 1:1 Help Now