top | item 47127802

(no title)

rhdunn | 6 days ago

COM is interesting as it implements interfaces using the C++ vtable layout, which can be done in C. Dynamic COM (DCOM) is used to provide interoperability with Visual Basic.

You can also access .NET/C# objects/interfaces via COM. It has an interface to allow you to get the type metadata but that isn't necessary. This makes it possible to e.g. get the C#/.NET exception stack trace from a C/C++ application.

discuss

order

tonyedgecombe|5 days ago

>Dynamic COM (DCOM) is used to provide interoperability with Visual Basic.

DCOM is Distributed COM not Dynamic COM[1].

COM does have an interface for dynamic dispatch called IDispatch[2] which is used for scripting languages like VBScript or JScript. It isn't required for Visual Basic though. VB is compiled and supports early binding to interfaces.

[1] https://en.wikipedia.org/wiki/Distributed_Component_Object_M...

[2] https://en.wikipedia.org/wiki/IDispatch

rhdunn|5 days ago

Ah yes, that's what I was thinking of. It's been a while since I've worked with COM.