How to avoid a System.Runtime.InteropServices.COMException?

后端 未结 4 1008
你的背包
你的背包 2020-11-29 07:56

In my Microsoft Surface project, I always get a lot of the following exceptions:

\'MuReSe.vshost.exe\' (Managed (v2.0.50727)): Loaded \'C:\\Windows\\assembly         


        
4条回答
  •  感情败类
    2020-11-29 08:55

    Your code (or some code called by you) is making a call to a COM method which is returning an unknown value. If you can find that then you're half way there.

    You could try breaking when the exception is thrown. Go to Debug > Exceptions... and use the Find... option to locate System.Runtime.InteropServices.COMException. Tick the option to break when it's thrown and then debug your application.

    Hopefully it will break somewhere meaningful and you'll be able to trace back and find the source of the error.

提交回复
热议问题