Solved

How to access to CD-ROM Tracks ?

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

831 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