Skip to main content

 none
IMAPI2 HRESULT E_FAIL has been returned from a call to a COM component RRS feed

  • Question

  • Hi 

    I'm having a similar issue, i have an application that burns into cd some files.

    stations are windows 7 x64, application is compiled .NET 4.0 and Plataform target x86

    sometimes application throws the error 
    IDiscFormat2Data.Write failed 
    Error HRESULT E_FAIL has been returned from a call to a COM component.

    This error is caught in this part of code

    //
                // Write the data here
                //
                try
                {
                    discFormatData.Write(fileSystem);
                    e.Result = 0;
                }
                catch (COMException ex)
                {
                    e.Result = ex.ErrorCode;
                    MessageBox.Show(ex.Message, "IDiscFormat2Data.Write failed",MessageBoxButtons.OK, MessageBoxIcon.Stop);
                }

                //
                // remove the Update event handler
                //
                discFormatData.Update -= new DiscFormat2Data_EventHandler(discFormatData_Update);

                if (bEjectMedia)
                {
                    discRecorder.EjectMedia();
                }

                discRecorder.ReleaseExclusiveAccess();
                int n = Marshal.ReleaseComObject(discRecorder);
            }

    Have any ideas? some bug in the application?   thank you

    Monday, September 25, 2017 9:50 PM