28 ms·
Language agnostic in that COM lets you use the C++ object model in any language you want.
by kijiki 4y ago
Language agnostic in that COM lets you use the C++ object model in any language you want.
- duped 4y agoNot really except in that QueryInterface returns a pointer to a struct of function pointers. It doesn't place a requirement on the layout of the object (for example you can use a fat pointer for a COM object, which is incompatible with the C++ object model)
- pjmlp 4y agoOn top of the sibling comment, as of WinRT, COM has been extended with a new ABI, based on additional base interface (IInspectable), replacing TLB libraries with .NET metadata, and support for generics (.NET style). So it isn't the C++ object model per se.
- dwaite 4y agoAs someone who programmed COM back in the day for C++ applications, I can tell you definitively that you got no benefits over other languages outside of brittle macros and non-standardized Visual C++ compiler magics. Especially once you crossed over into Office/VB land, and everything was just IDispatch, Variants, BSTRs and SafeArrays.