XPBurn component

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using XPBurnComponent to burn one file on a CD. As soon as the burning process has been completed, I am trying to delete the file but I get an error stating that the file is being used by another process and cannot be deleted.
After I have closed the Form that instantiates the XPBurnComponent and burns the file to the CD, I can normally delete the file.

Thanks
 
Aristeidis,

I'm not familiar with XPBurnComponent, but I'm guessing it's using the
ICDBurn COM interface built into XP. If so, you will most likely need to
release the COM interface in order to release any handles it may have. This
is likely why you have to close the Form in order to delete your files. A
way to avoid this problem is to dispose of the COM interface yourself
instead of passing on this task to the runtime.

Eric

Aristeidis Bampakos said:
I am using XPBurnComponent to burn one file on a CD. As soon as the
burning process has been completed, I am trying to delete the file but I get
an error stating that the file is being used by another process and cannot
be deleted.
After I have closed the Form that instantiates the XPBurnComponent and
burns the file to the CD, I can normally delete the file.
 
My code contains:

XPBurnCD burn = new XPBurnCD();
Marshal.ReleaseComObject( (object)burn) ;

and returns me an InvalidCastException, that is the BURN object is not a valid COM
component.
Any ideas?
 
Aristeidis Bampakos said:
My code contains:

XPBurnCD burn = new XPBurnCD();
Marshal.ReleaseComObject( (object)burn) ;

and returns me an InvalidCastException, that is the BURN object is not a valid COM
component.
Any ideas?


XPBurnCD must not be a COM component. If this is a true
System.ComponentModel.Component then it must have a Dispose() method or some
equivalent. Are you calling it?

-- Alan
 
No, it does not have any Dispose() method.

Alan Pretre said:
XPBurnCD must not be a COM component. If this is a true
System.ComponentModel.Component then it must have a Dispose() method or some
equivalent. Are you calling it?

-- Alan
 
Aristeidis Bampakos said:
No, it does not have any Dispose() method.

If there is no other close or cleanup routine that you are supposed to call,
then it sounds to me like a defect in their component. You might try
contacting them for advice.

-- Alan
 
Back
Top