473,385 Members | 1,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

IMAPI having issues with IDiscRecorder QueryMediaType

I would like to do some error checking to see if the CD is write
protected or not or whether there is even a CD media at all. From what
I gather I should be calling the method QueryMediaType. However, on
the call right before I set my DiscRecorder

hr = pDiscMaster->SetActiveDiscRecorder(pDiscRecorder);

I keep getting same HRESULT

-2147220964
Since my Recorder isn't set, I can't make the QueryMediaType call.
Other than that the CD burning works.

This is the order i'm making the method calls

IDiscMaster->Open
SetActiveDiscMasterFormat( IJolietDiscMaster )
IDiscMaster->EnumDiscRecorders( IEnumDiscRecorders )
IEnumDiscRecorders->Next( IDiscRecorder )
IDiscMaster->SetActiveDiscRecorder( IDiscRecorder )

Any ideas?

Greatly Appreciated! Thanks!

Jun 1 '06 #1
6 3023
<to****@gmail.com> wrote in message
news:11*********************@i39g2000cwa.googlegro ups.com...
I would like to do some error checking to see if the CD is write
protected or not or whether there is even a CD media at all. From what
I gather I should be calling the method QueryMediaType. However, on
the call right before I set my DiscRecorder

hr = pDiscMaster->SetActiveDiscRecorder(pDiscRecorder);

I keep getting same HRESULT

-2147220964
That appears to be IMAPI_E_DISCFULL, about which the SetActiveDiscRecorder
documentation curiously says, "the active recorder is still set and
initialized. ".

Since my Recorder isn't set, I can't make the QueryMediaType call.
I'm no authority, but I don't think you need to -- and maybe shouldn't, wait
until after SetActiveDiscRecorder to call QueryMediaType.
Other than that the CD burning works.


Now that sounds odd that it works after an IMAPI_E_DISCFULL. :)

--
Jeff Partch [VC++ MVP]

Jun 1 '06 #2
Oh no, I get that result because I am either not putting a disc in or
putting a disc that is write protected. If I put a writeable disc
everything works fine.

I'm just curious because isn't it the case when I put in a faulty disc
that I can call QueryMediaType to find out what type of error I have?

Thanks,
Tony

Jeff Partch [MVP] wrote:
<to****@gmail.com> wrote in message
news:11*********************@i39g2000cwa.googlegro ups.com...
I would like to do some error checking to see if the CD is write
protected or not or whether there is even a CD media at all. From what
I gather I should be calling the method QueryMediaType. However, on
the call right before I set my DiscRecorder

hr = pDiscMaster->SetActiveDiscRecorder(pDiscRecorder);

I keep getting same HRESULT

-2147220964

That appears to be IMAPI_E_DISCFULL, about which the SetActiveDiscRecorder
documentation curiously says, "the active recorder is still set and
initialized. ".

Since my Recorder isn't set, I can't make the QueryMediaType call.


I'm no authority, but I don't think you need to -- and maybe shouldn't, wait
until after SetActiveDiscRecorder to call QueryMediaType.
Other than that the CD burning works.


Now that sounds odd that it works after an IMAPI_E_DISCFULL. :)

--
Jeff Partch [VC++ MVP]


Jun 1 '06 #3
<to****@gmail.com> wrote in message
news:11*********************@c74g2000cwc.googlegro ups.com...
I'm just curious because isn't it the case when I put in a faulty disc
that I can call QueryMediaType to find out what type of error I have?


You can call QMT to find out what type of media you have in the recorder.

--
Jeff Partch [VC++ MVP]
Jun 2 '06 #4
I think you're getting confused by what I am saying. It is because the
SetActiveDiscRecorder is failing so that I can't call QMT. Is
SetActiveDiscRecorder suppose to fail when there is NO CD or when there
is a write protected CD?

Thanks,
Tony

Jeff Partch [MVP] wrote:
<to****@gmail.com> wrote in message
news:11*********************@c74g2000cwc.googlegro ups.com...
I'm just curious because isn't it the case when I put in a faulty disc
that I can call QueryMediaType to find out what type of error I have?


You can call QMT to find out what type of media you have in the recorder.

--
Jeff Partch [VC++ MVP]


Jun 2 '06 #5
<to****@gmail.com> wrote in message
news:11*********************@h76g2000cwa.googlegro ups.com...
I think you're getting confused by what I am saying.
No, not really. :)
It is because the
SetActiveDiscRecorder is failing so that I can't call QMT.
Like I said before, SetActiveDiscRecorder has nothing to do with your
ability to call QMT or any IDiscRecorder method...

http://msdn.microsoft.com/library/de...screcorder.asp

"All [methods] may be used on an IDiscRecorder object even if the disc
recorder is not the active disc recorder. The IMAPI client does not have to
call IDiscMaster::SetActiveDiscRecorder first".
Is
SetActiveDiscRecorder suppose to fail when there is NO CD or when there
is a write protected CD?


Based on the documented return codes, I'd say yes...

http://msdn.microsoft.com/library/de...screcorder.asp

IMAPI_E_DISCFULL
The disc in the drive is one of the following media types: CD-ROM, audio
CD-R(W), or full CD-R(W). Note that the active recorder is still set and
initialized.
IMAPI_E_MEDIUM_NOTPRESENT
There is no medium in the burner.

--
Jeff Partch [VC++ MVP]

Jun 2 '06 #6
ahhhh..i got it!

thanks! =D
Jeff Partch [MVP] wrote:
<to****@gmail.com> wrote in message
news:11*********************@h76g2000cwa.googlegro ups.com...
I think you're getting confused by what I am saying.


No, not really. :)
It is because the
SetActiveDiscRecorder is failing so that I can't call QMT.


Like I said before, SetActiveDiscRecorder has nothing to do with your
ability to call QMT or any IDiscRecorder method...

http://msdn.microsoft.com/library/de...screcorder.asp

"All [methods] may be used on an IDiscRecorder object even if the disc
recorder is not the active disc recorder. The IMAPI client does not have to
call IDiscMaster::SetActiveDiscRecorder first".
Is
SetActiveDiscRecorder suppose to fail when there is NO CD or when there
is a write protected CD?


Based on the documented return codes, I'd say yes...

http://msdn.microsoft.com/library/de...screcorder.asp

IMAPI_E_DISCFULL
The disc in the drive is one of the following media types: CD-ROM, audio
CD-R(W), or full CD-R(W). Note that the active recorder is still set and
initialized.
IMAPI_E_MEDIUM_NOTPRESENT
There is no medium in the burner.

--
Jeff Partch [VC++ MVP]


Jun 6 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Perry | last post by:
I desperately need help to get the IMAPI (Image Mastering API interface comes with Windows XP to burn CD) to work on my PC. I downloaded the IMAPI sample on Microsoft website: ...
0
by: Nadav | last post by:
Hi, I wonder, does the .NET Framework include an implementation for the IMAPI? ( not the MAPI API ) does it provide a specialized class for that? does ICDBurn is included in the collection...
2
by: Tony B | last post by:
Does anybody know what sdk is needed for VB 5.0 for using the IMAPI functions for writing files to cd in windows XP...or where can i download it from. I think this is it Microsoft Platform SDK,...
7
by: tonylc | last post by:
Hi, I'm trying to program in 2003 Visual Studio to try and burn files onto a cd burner in windows xp service pack 2. http://msdn.microsoft.com/msdnmag/issues/04/04/CQA/ I found some code on...
1
by: tonylc | last post by:
does anyone know what you need to include to get Visual Studio 2003 or 2005 to recognize IDiscMaster, IDiscRecorder and all the other interfaces in IMAPI? Right my visual studio only recognizes...
9
by: tonylc | last post by:
Hey guys, I got IMAPI to burn, but I would like to set up this progress events so I can make a progress bar to go along with the burn process. Right now I'm not exactly sure how to get this to...
5
by: tonylc | last post by:
Hey guys, In my burn project, I have everything working except the cancellation of the burn. I have it setup such that when the user initiates a "cancel" the IDiscMasterProgressEvents handler...
0
by: tonylc | last post by:
I am getting an error in the DiscMaster's SetActiveDiscRecorder whenever I put in a CD that is formatted by a 3rd party software. I know that IMAPI only works with formatted cds suitable for...
2
by: cagi | last post by:
Hi to all, this is my first post here so I'm hoping you can help me. Now I'm writing a app which, among all other things need to record some data to CD. I'm using IMAPI v1 and here is the problem: i...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.