I have written a class library (.dll) in C#, which is called from a 3rd-party .exe. The .exe calls a method in my .dll, passing a COM Object to my method. For various reasons, I don't have access to an equivalent class definition of this COM Object, but I am able to discover its public methods and properties, using this handy DispatchUtility
class tool. I hoped to create an extern class
definition, so I can access those members, but as I discovered, C# does not allow that.
What is the best/"proper" way to access these class members?