Problem with reading CD TOC

Hi All.
Does anybody know why it’s impossible to read TOC using SCSI commands when
CD is being played by someone?

Thanx in advance.

Some additional details would be really helpful. Like, what do you mean
by “impossible”? What is the exact problem you’re having? What API
call is returning what error? Etc.

Chuck

----- Original Message -----
From: “Dmitry Gubarkov”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Thursday, September 02, 2004 2:24 PM
Subject: [ntdev] Problem with reading CD TOC

> Hi All.
> Does anybody know why it’s impossible to read TOC using SCSI commands
> when
> CD is being played by someone?
>
> Thanx in advance.

I call DeviceIoControl which returns FALSE when CD is already played.
GetLastError return 0x000005aa error code.
If CD isn’t played return value is TRUE. All ok. I can read TOC.

“Chuck Batson” wrote in message
news:xxxxx@ntdev…
> Some additional details would be really helpful. Like, what do you mean
> by “impossible”? What is the exact problem you’re having? What API
> call is returning what error? Etc.
>
> Chuck
>
> ----- Original Message -----
> From: “Dmitry Gubarkov”
> Newsgroups: ntdev
> To: “Windows System Software Devs Interest List”
> Sent: Thursday, September 02, 2004 2:24 PM
> Subject: [ntdev] Problem with reading CD TOC
>
>
> > Hi All.
> > Does anybody know why it’s impossible to read TOC using SCSI commands
> > when
> > CD is being played by someone?
> >
> > Thanx in advance.
>
>

What do you mean by “CD is already played” – i.e., what is doing the
reading/playing?

I don’t believe there’s any inherent problem with reading the TOC while
the drive is reading. I can read an audio CD’s TOC while the disc is
playing via WMP, without any error. I’m running Windows XP SP2 today,
though I can’t recall ever having a problem with this on prior
incarnations of the OS. Of course it’s possible for any filter driver
to reject IRPs from above, which is why I ask what exactly is doing the
“playing” in your case.

Chuck

----- Original Message -----
From: “Dmitry Gubarkov”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Thursday, September 02, 2004 3:43 PM
Subject: Re:[ntdev] Problem with reading CD TOC

>I call DeviceIoControl which returns FALSE when CD is already played.
> GetLastError return 0x000005aa error code.
> If CD isn’t played return value is TRUE. All ok. I can read TOC.
>
> “Chuck Batson” wrote in message
> news:xxxxx@ntdev…
>> Some additional details would be really helpful. Like, what do you
>> mean
>> by “impossible”? What is the exact problem you’re having? What API
>> call is returning what error? Etc.
>>
>> Chuck
>>
>> ----- Original Message -----
>> From: “Dmitry Gubarkov”
>> Newsgroups: ntdev
>> To: “Windows System Software Devs Interest List”
>>
>> Sent: Thursday, September 02, 2004 2:24 PM
>> Subject: [ntdev] Problem with reading CD TOC
>>
>>
>> > Hi All.
>> > Does anybody know why it’s impossible to read TOC using SCSI
>> > commands
>> > when
>> > CD is being played by someone?
>> >
>> > Thanx in advance.

CD were played via cdplayer.exe, WMP and WinAmp.
In all cases I can’t get TOC. I’m running Windows 2K.
Works fine if I use IOCTL_CDROM_READ_TOC, but fails if I try via SCSI.

“Chuck Batson” wrote in message
news:xxxxx@ntdev…
> What do you mean by “CD is already played” – i.e., what is doing the
> reading/playing?
>
> I don’t believe there’s any inherent problem with reading the TOC while
> the drive is reading. I can read an audio CD’s TOC while the disc is
> playing via WMP, without any error. I’m running Windows XP SP2 today,
> though I can’t recall ever having a problem with this on prior
> incarnations of the OS. Of course it’s possible for any filter driver
> to reject IRPs from above, which is why I ask what exactly is doing the
> “playing” in your case.
>
> Chuck
>
> ----- Original Message -----
> From: “Dmitry Gubarkov”
> Newsgroups: ntdev
> To: “Windows System Software Devs Interest List”
> Sent: Thursday, September 02, 2004 3:43 PM
> Subject: Re:[ntdev] Problem with reading CD TOC
>
>
> >I call DeviceIoControl which returns FALSE when CD is already played.
> > GetLastError return 0x000005aa error code.
> > If CD isn’t played return value is TRUE. All ok. I can read TOC.
> >
> > “Chuck Batson” wrote in message
> > news:xxxxx@ntdev…
> >> Some additional details would be really helpful. Like, what do you
> >> mean
> >> by “impossible”? What is the exact problem you’re having? What API
> >> call is returning what error? Etc.
> >>
> >> Chuck
> >>
> >> ----- Original Message -----
> >> From: “Dmitry Gubarkov”
> >> Newsgroups: ntdev
> >> To: “Windows System Software Devs Interest List”
> >>
> >> Sent: Thursday, September 02, 2004 2:24 PM
> >> Subject: [ntdev] Problem with reading CD TOC
> >>
> >>
> >> > Hi All.
> >> > Does anybody know why it’s impossible to read TOC using SCSI
> >> > commands
> >> > when
> >> > CD is being played by someone?
> >> >
> >> > Thanx in advance.
>
>

I just tried on Win2K SP 0 – no problem for me. I use
IOCTL_SCSI_PASS_THROUGH_DIRECT.

Chuck

----- Original Message -----
From: “Dmitry Gubarkov”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Thursday, September 02, 2004 6:32 PM
Subject: Re:[ntdev] Re:Problem with reading CD TOC

> CD were played via cdplayer.exe, WMP and WinAmp.
> In all cases I can’t get TOC. I’m running Windows 2K.
> Works fine if I use IOCTL_CDROM_READ_TOC, but fails if I try via SCSI.
>
> “Chuck Batson” wrote in message
> news:xxxxx@ntdev…
>> What do you mean by “CD is already played” – i.e., what is doing the
>> reading/playing?
>>
>> I don’t believe there’s any inherent problem with reading the TOC
>> while
>> the drive is reading. I can read an audio CD’s TOC while the disc is
>> playing via WMP, without any error. I’m running Windows XP SP2
>> today,
>> though I can’t recall ever having a problem with this on prior
>> incarnations of the OS. Of course it’s possible for any filter
>> driver
>> to reject IRPs from above, which is why I ask what exactly is doing
>> the
>> “playing” in your case.
>>
>> Chuck
>>
>> ----- Original Message -----
>> From: “Dmitry Gubarkov”
>> Newsgroups: ntdev
>> To: “Windows System Software Devs Interest List”
>>
>> Sent: Thursday, September 02, 2004 3:43 PM
>> Subject: Re:[ntdev] Problem with reading CD TOC
>>
>>
>> >I call DeviceIoControl which returns FALSE when CD is already
>> >played.
>> > GetLastError return 0x000005aa error code.
>> > If CD isn’t played return value is TRUE. All ok. I can read TOC.

I use the same IOCTL_SCSI_PASS_THROUGH_DIRECT. But it doesn’t work.

Strange. But never the less thanx.

“Chuck Batson” wrote in message
news:xxxxx@ntdev…
> I just tried on Win2K SP 0 – no problem for me. I use
> IOCTL_SCSI_PASS_THROUGH_DIRECT.
>
> Chuck
>
> ----- Original Message -----
> From: “Dmitry Gubarkov”
> Newsgroups: ntdev
> To: “Windows System Software Devs Interest List”
> Sent: Thursday, September 02, 2004 6:32 PM
> Subject: Re:[ntdev] Re:Problem with reading CD TOC
>
>
> > CD were played via cdplayer.exe, WMP and WinAmp.
> > In all cases I can’t get TOC. I’m running Windows 2K.
> > Works fine if I use IOCTL_CDROM_READ_TOC, but fails if I try via SCSI.
> >
> > “Chuck Batson” wrote in message
> > news:xxxxx@ntdev…
> >> What do you mean by “CD is already played” – i.e., what is doing the
> >> reading/playing?
> >>
> >> I don’t believe there’s any inherent problem with reading the TOC
> >> while
> >> the drive is reading. I can read an audio CD’s TOC while the disc is
> >> playing via WMP, without any error. I’m running Windows XP SP2
> >> today,
> >> though I can’t recall ever having a problem with this on prior
> >> incarnations of the OS. Of course it’s possible for any filter
> >> driver
> >> to reject IRPs from above, which is why I ask what exactly is doing
> >> the
> >> “playing” in your case.
> >>
> >> Chuck
> >>
> >> ----- Original Message -----
> >> From: “Dmitry Gubarkov”
> >> Newsgroups: ntdev
> >> To: “Windows System Software Devs Interest List”
> >>
> >> Sent: Thursday, September 02, 2004 3:43 PM
> >> Subject: Re:[ntdev] Problem with reading CD TOC
> >>
> >>
> >> >I call DeviceIoControl which returns FALSE when CD is already
> >> >played.
> >> > GetLastError return 0x000005aa error code.
> >> > If CD isn’t played return value is TRUE. All ok. I can read TOC.
>
>

It’s odd that GLE is reporting ERROR_NO_SYSTEM_RESOURCES; I don’t expect
that this occurs on many systems due to a check condition. You may want
to look to see who (if anyone) is consuming lots of memory in your
system. If that’s not the case, check that your handle to the device is
valid – some players require exclusive access to the device.

On Windows 2000, digital audio playback was not enabled for CD drives by
default. In this case, when audio is playing, it is likely being played
using an analog mode. In this case, when analog audio playback is
occurring, the READ_TOC command (per the specification) is not required
to succeed. To quote the spec:

Only logical units that cache the TOC will be able to respond to
this command while the play is in progress. If the logical unit
does not support caching the TOC, the command may not be performed
and a CHECK CONDITION will be generated.

One easy thing to try is to bring up the device’s property page
(right-click in explorer, choose properties), and enable digital audio
playback on the device manually. This will automagically enable digital
playback for the device.

Hth,
.

-----Original Message-----
From: Dmitry Gubarkov [mailto:xxxxx@ukr.net]
Sent: Thursday, September 02, 2004 7:48 AM
Subject: Re: Re:Re:Problem with reading CD TOC

I use the same IOCTL_SCSI_PASS_THROUGH_DIRECT. But it doesn’t work.

Strange. But never the less thanx.

“Chuck Batson” wrote in message
news:xxxxx@ntdev…
> I just tried on Win2K SP 0 – no problem for me. I use
> IOCTL_SCSI_PASS_THROUGH_DIRECT.
>
> Chuck
>
> ----- Original Message -----
> From: “Dmitry Gubarkov”
> Newsgroups: ntdev
> To: “Windows System Software Devs Interest List”
> Sent: Thursday, September 02, 2004 6:32 PM
> Subject: Re:[ntdev] Re:Problem with reading CD TOC
>
>
> > CD were played via cdplayer.exe, WMP and WinAmp.
> > In all cases I can’t get TOC. I’m running Windows 2K.
> > Works fine if I use IOCTL_CDROM_READ_TOC, but fails if I try via
SCSI.
> >
> > “Chuck Batson” wrote in message
> > news:xxxxx@ntdev…
> >> What do you mean by “CD is already played” – i.e., what is doing
the
> >> reading/playing?
> >>
> >> I don’t believe there’s any inherent problem with reading the TOC
> >> while
> >> the drive is reading. I can read an audio CD’s TOC while the disc
is
> >> playing via WMP, without any error. I’m running Windows XP SP2
> >> today,
> >> though I can’t recall ever having a problem with this on prior
> >> incarnations of the OS. Of course it’s possible for any filter
> >> driver
> >> to reject IRPs from above, which is why I ask what exactly is doing
> >> the
> >> “playing” in your case.
> >>
> >> Chuck
> >>
> >> ----- Original Message -----
> >> From: “Dmitry Gubarkov”
> >> Newsgroups: ntdev
> >> To: “Windows System Software Devs Interest List”
> >>
> >> Sent: Thursday, September 02, 2004 3:43 PM
> >> Subject: Re:[ntdev] Problem with reading CD TOC
> >>
> >>
> >> >I call DeviceIoControl which returns FALSE when CD is already
> >> >played.
> >> > GetLastError return 0x000005aa error code.
> >> > If CD isn’t played return value is TRUE. All ok. I can read TOC.
>
>