3 ms·
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 Co
by scarface74 8y ago
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?
- pjmlp 8y agoCOM has been the future of Windows APIs since Vista. Every Windows API that isn't exposed to .NET since Vista, does require COM interoperability.
- scarface74 8y agoNot 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-difference-between-pinvoke-and-com-interop 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.
- pjmlp 8y agoI see you haven't done much WinRT/UWP.
- scarface74 8y agoYou 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-apps-with-windows-8-winrt https://stackoverflow.com/questions/8881335/pinvoke-in-metro... So no, you are not required to use COM for Windows API even with WinRT.
- pjmlp 8y agoAs you wish.