Earlier quoted context omitted.
That UWP thing is the new real native. On some Windows platforms, win32 API is emulated and very limited. It works fine without .NET. The API is COM-like, can be consumed from C++ and JavaScript. However, C# is much simpler than C++ for that, one reason is many APIs are asynchronous and C++ has no async-await.
The API is COM-like I have been forced to use COM a few times, and that doesn't sound very encouraging... IMHO Win32 is simpler for a lot of things, compare for example the task of using the file selection dialog the Win32 way: https://msdn.microsoft.com/en-us/library/windows/desktop/ms6... ...with the COM "replacement": https://msdn.microsoft.com/en-us/library/windows/desktop/bb7... (There's a 10-level nested if in…
I use COM a lot and I love it.
The problem with COM is it’s too many things at once.
It’s an excellent ABI.
At the same time it’s crappy RPC and overengineered serialization framework. In addition, registration could become a point of failure.
You can only use good parts and ignore the bad ones. See how MS did it with their Direct3D or MediaFoundation.
> 10-level nested if in that code
You can write shitty code like that with any framework and in any language. Doesn’t say anything about a framework or language.
Apparently, there’s some stupid policy that prevents them from using ATL in their code samples.
With CComPtr instead of raw interface pointers, you can just return the code when FAILED(), the destructor will release the objects as needed.