Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would think that COM as an escape hatch for interoperability would survive the heat death of the universe.

Shouldn’t it be possible to wrap a Windows .Net Core app with a COM interface and register that for use in an old Framework app or vice versa?



COM has been the future of Windows APIs since Vista.

Every Windows API that isn't exposed to .NET since Vista, does require COM interoperability.


Not really. You don’t use COM to access Windows API’s. P/Invoke is a completely separate method than COM.

https://stackoverflow.com/questions/3138003/what-is-the-diff...

COM and C interop have always been separate and COM has been around since 1993.

In fact, the native Win32 APIs use C style null terminated byte or double byte character arrays for strings. COM uses BSTR types - double byte arrays where the first two bytes are the length.


I see you haven't done much WinRT/UWP.


You said that:

Every Windows API that isn't exposed to .NET since Vista, does require COM interoperability

You did not say “if you are using WinRT/UWP”. Also you said “since Vista”. WinRT was released with Windows 8, UWP was released with Windows 10.

Also P/invoke is supported in WinRT https://stackoverflow.com/questions/8881335/pinvoke-in-metro...

So no, you are not required to use COM for Windows API even with WinRT.


As you wish.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: