Windows Anniversary Update (1607) & ComException

2

I have an application (C#) which uses ComInterop to manipulate and print documents from a 3rd Party App (Corel Draw x8).

After Updating to Windows 1607 (Anniversary Update), things stop working immediately with creating my object (cdr = new CorelDRAW.Application();), or with the next line (hiding CorelDraw's window) with an error:

System.Runtime.InteropServices.COMException

App busy.

(Ausnahme von HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))

or later

HRESULT: 0x80010105 (RPC_E_SERVERFAULT)

Same app with same Version of CorelDraw x8 under Windows 7 continued working as it should, and after uninstalling Windows 10 Anniversary Update, my apps is working again as intended.

So, does anyone know how to work around this issue? Is it known yet? Any help welcome :) !

c#
interop
windows-10
asked on Stack Overflow Aug 18, 2016 by Mr. Muh • edited Aug 19, 2016 by magicandre1981

2 Answers

1

I had a similar problem with my C#-Application, which creates complex Excel-Files. After the Anniversary-Update the Application throws the Error-Message:

HRESULT: 0x80010105 (RPC_E_SERVERFAULT)

To locate the position, where the error occurs, I started the application in the Debug-mode. In this mode, you can run througth the code line by line by pressing F11. But in this mode the Error didn't occour. Because of this, my idea was that the Application normally ran to fast and that's the reason for the kommunication problems with Excel.

So I complete the Code in critical parts, where the application draws border or change the backcolour with Thread.Sleep(100)-instructions. After each line:

[...]

Thread.Sleep(100);

wSheet.get_Range(...).Style.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter;

Thread.Sleep(100);    

wSheet.get_Range(...).BorderAround(Excel.XlLineStyle.xlContinuous, Excel.XlBorderWeight.xlHairline);

Thread.Sleep(100); 

wSheet.get_Range(...).Cells.Interior.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.White);

[...]

It works! Don't not why, but it works.

Hope I could help and sorry for my bad english. ;)

Regards,

Mario

answered on Stack Overflow Sep 22, 2016 by Mario • edited Sep 22, 2016 by FrankS101
0

I have a quite similar problem in my Windows 10 anniversary update. My Program trys to open Excel object using COM.

System.Runtime.InteropServices.COMException: Error from Server (HRESULT   Exception:0x80010105 (RPC_E_SERVERFAULT))
 at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
 at System.Dynamic.ComRuntimeHelpers.CheckThrowException(Int32 hresult, ExcepInfo& excepInfo, UInt32 argErr, String message)
 at CallSite.Target(Closure , CallSite , ComObject , String , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object )
 at CallSite.Target(Closure , CallSite , Object , String , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object )
answered on Stack Overflow Oct 17, 2016 by Shoji Urashita

User contributions licensed under CC BY-SA 3.0