Added a new method to a COM object that gets exception when called

0

I have a method I have added to my COM class and everytime it gets called I get the following exception:

Exception : System.Runtime.InteropServices.COMException (0x800706BE): The remote procedure call failed. (Exception from HRESULT: 0x800706BE) at System.EnterpriseServices.IRemoteDispatch.RemoteDispatchNotAutoDone(String s)

There are other methods in this COM class that get called all the time with no problems. It only happens on my new method. Is there something special you need to do when adding new methods to COM objects? Let me know if more detail is needed.

c#
com
asked on Stack Overflow Feb 22, 2012 by g.t.w.d • edited Feb 22, 2012 by John Saunders

1 Answer

0

Did you regenerate the COM interop wrapper after updating the COM object?

If I'm wrong on this clarification, please set me straight: I'm guessing you are referencing a COM lib from a managed C# lib? When the ref is made, VS should generate an interop wrapper for you, but I'm not sure it will detect a change and regenerate the wrapper unless you manually re-reference your COM dll or regen the interop yourself.

answered on Stack Overflow Feb 22, 2012 by swannee

User contributions licensed under CC BY-SA 3.0