5 ms·
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-t
by scarface74 8y ago
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-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.