Hi Jo,
You are THE MAN! Your revised component, with clear() and close() methods,
plus the call of these after the burncomplete event did the trick
Thanks so much!
Bernie
I worked out some other stuff last night.
The call to work out the free space is worng. It actually tells you the
used space in the staging area. It only changes when files are added by
imapi (not by the vb program or by the xpburn component. In other words
it is useless unless I manage to re-write the component. (I'd like to
strip the component down to be just a wrapper - so that I can call all
the imapi methods and properties from vb).
The thing can still get stuck - I've had disks that the program can't
erase, but windows can. There are lots more conditions to check as well -
is there a cd inserted, is something being burnt as the program starts.
I was trying to figure out how to get the cd drive letter - the
xpburncomponent can return the path, by which it means the "nt device
path" which is /ide0/cdrom0. I can't see how to map that back to the
drive letter - there is some stuff about it in the msdn library but it is
for device driver writers. I'll have a rummage through the registry and
see if I can find a way to do it. You could get a user with two identical
burner drives, and the user would be unable to distinguish between them.
Unfortunately XP lets you remap the drive letters, so you can't just name
them as they would appear in dos (lowest bus, lowest drive gets the
lowest letter, hard disks before cds).
I'll play some more. I'll start a new thread sometime and probably update
the program on planetsourcecode.