?
Solved

How to access to CD-ROM Tracks ?

Posted on 1999-01-13
3
Medium Priority
?
297 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 400 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses
Course of the Month14 days, 20 hours left to enroll

840 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