3 ms·
there is a big difference between out of process COM (like Office Automation) and in process COM (like WinRT and UWP or DirectX). Out of process was always a li
by Ididntdothis 6y ago
there is a big difference between out of process COM (like Office Automation) and in process COM (like WinRT and UWP or DirectX). Out of process was always a little tricky and not implemented well. DCOM was even worse. In process COM works really well.
Edit: I should add that C# isn’t the best language for COM because it doesn’t release objects when they go out of scope so you either have to release everything manually or wait for the GC to kick in which can cause memory problems. VB and C++ and even PHP are better that way.
- jfkebwjsbx 6y agoWhat is the point of "In process COM"? Is the same as any other library? I thought COM was meant to communicate between processes? Any enlightenment is appreciated...
- jdub 6y agoIt lets you use libraries written in numerous supported languages with a richer, more object oriented interface than a C ABI. You can use the same underlying interface to call out of process or distributed objects.
- snuxoll 6y agoCOM is primarily used in-process, it exposes an ABI that allows multiple languages to operate on a common object model within the same process. That's why you can import COM controls into a .Net application by referencing the DLL in your project and work with them as if they were native CLR objects - or Python, Ruby, Perl, etc. for that matter.
- Ididntdothis 6y agoCOM is Common Object Model. What you mean is OLE. In process COM calls are basically direct DLL calls and therefore very fast.
- pjmlp 6y agoThat was kind of sorted out with the COM improvements in .NET 4.0 and SafeHandles.
- Ididntdothis 6y agoCan you give more detail?
- mycall 6y agoIs these problems fixed with AOT C# (CoreRT)?
- rk06 6y agoUnlikely, as those problems are coming because of Garbage Collection which is a core part of language. C++/Rust don't have GC, so they don't have those problems