> I've had a look at this but having some troubles... you have some good
> samples included but none cover this particular function...
>
> Anyway, don't suppose you have a small sample (preferably VB or
> VB.Net) I could look at? I will be using in a VB.Net app (assuming I
> can get it to work).

Signature
Eduardo A. Morcillo [MS MVP]
http://www.mvps.org/emorcillo
Bummer... that'd make it difficult... so you can't give me a better idea of
the syntax?
I tried this:
Dim objCD As CDBurn
Set objCD = New CDBurn
If objCD.HasRecordableDrive Then
Dim strDrive As String
strDrive = objCD.GetRecorderDriveLetter("z:", 1)
Dim lngResult As Long
lngResult = objCD.Burn
Else
MsgBox "No CD writer found", vbOKOnly + vbExclamation, ""
End If
It doesn't work of course... not sure what handle to pass the Burn method,
whether the first parameter for GetRecorderDriveLetter is correct, or even
what the second parameter is... also the type library doesn't indicate what
datatype is returned by the GetRecorderDriveLetter or Burn methods so I took
a guess...
Any clues?
Cheers again
> > I've had a look at this but having some troubles... you have some good
> > samples included but none cover this particular function...
[quoted text clipped - 4 lines]
>
> There's no sample because I don't have a CD writter to test it :-(
Eduardo A. Morcillo [MS MVP] - 31 Oct 2003 15:54 GMT
The interface is documented in the MSDN:
http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/ifaces/
icdburn/icdburn.asp

Signature
Eduardo A. Morcillo [MS MVP]
http://www.mvps.org/emorcillo
Randy Birch - 31 Oct 2003 23:44 GMT
Bob ...
ICDBurn::GetRecorderDriveLetter returns the CD drive letter ... you pass a
buffer and the buffer size and the drive letter is returned. It's not
required for the Burn method however. Try:
Dim objCD As CDBurn
Set objCD = New CDBurn
If objCD.HasRecordableDrive Then
Dim strDrive As String
dim buff as string
dim buffsize as long
Dim lngResult As Long
const S_OK as long = 0
buff = space$(4)
buffsize = len(buff)
if objCD.GetRecorderDriveLetter(buff, buffsize) = S_OK then
lngResult = objCD.Burn(me.hwnd)
else
msgbox "no drive letter returned"
end if
Else
MsgBox "No CD writer found", vbOKOnly + vbExclamation, ""
End If

Signature
Randy Birch
MVP Visual Basic
http://www.mvps.org/vbnet/
Please respond only to the newsgroups so all can benefit.
: Bummer... that'd make it difficult... so you can't give me a better idea of
: the syntax?
[quoted text clipped - 31 lines]
: >
: > There's no sample because I don't have a CD writter to test it :-(