News for hackers. Stuff that matters.
Re:Microsoft Throws in the Towel on UWP, Elevates Win32 by pcwalton on Friday May 10, 2019 @10:11PM (#19884072)
Also, that code isn't C, it's C++. Method calls are a C++ feature. While you could use COM without language support for method calls, because the ABI is stable, it isn't really something that Microsoft supports.
Re:Microsoft Throws in the Towel on UWP, Elevates Win32 by Iwan-Zotow on Friday May 10, 2019 @11:11PM (#19884298)
Of course Microsoft supports it, why not? There is no magic in COM, had COM object written in C
Re:Microsoft Throws in the Towel on UWP, Elevates Win32 by pcwalton on Friday May 10, 2019 @11:59PM (#19884461)
I don't mean that calling COM objects from C doesn't work. I just mean that COM isn't designed to be used from C.
Re:Microsoft Throws in the Towel on UWP, Elevates Win32 by tonyedgecombe on Saturday May 11, 2019 @04:05AM (#19885144)
Actually I think it was, that was the lowest common denominator.
Re:Microsoft Throws in the Towel on UWP, Elevates Win32 by pjmlp on Monday May 13, 2019 @06:13AM (#19897717)
Not really, COM is a subset of OLE 2.0, designed to replace VBX as OCX originally.

Naturally OLE was designed as C framework back in Win16 days, with endless pages of boilerplate code.

https://www.amazon.com/Windows-Programmers-Guide-Book-Disk/d...

As such COM can be called from C, specially since C++ Windows compilers have a VTBL layout as if they were a plain old C struct with function pointers.

However unless one is masochist, it is not sane to use COM from bare bones C.

Re:Microsoft Throws in the Towel on UWP, Elevates Win32 by teddyuk on Friday May 10, 2019 @10:28PM (#19884143)
I remember using C to call com components as a learning excercise - it was just that to see how it worked. You wouldn’t do it otherwise