Click here to Skip to main content
15,886,137 members
Articles / Programming Languages / C#

Adding COM methods to an existing COM module results in unhandled exception?

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
23 Jan 2013CPOL 3.9K  
I have a COM written in C++ accessed by .NET C# application.The COM was originally written by someone else and has already been launched as a product many years ago.Now, I've had to make alterations to it.I added a few interfaces and this seems to work.I then added a few methods...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
23 Jan 2013chaau
I think what's your missing is idTry to enumerate all your methods in the interface and assigns the ids, something like this:interface IMyInterface: IUnknown{ [id(1), helpstring("method Method1") HRESULT Method1(); [id(2), helpstring("method MethodNewlyAdded") HRESULT...
Please Sign up or sign in to vote.
23 Jan 2013PaulowniaK
There is a wrapper module further up that implements stubs. I forgot to add the new methods to the list of stubs. :doh:

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Japan Japan
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions