Nadav,
It should be pointed out that there is no such thing as "native COM".
COM is an interface-based architecture which doesn't have a native
implementation (although the implementation and use in some languages is
easier than others).
There is always going to be a performance penalty for marshaling
unmanaged data to the managed realm. While you can marshal memory pointers
(IntPtr is really good at this), if you want to do anything meaningful on
the other side of the managed/unmanaged boundary, you are going to have to
perform some sort of operation (which is always going to take time).
If you are looking for the best performance, your best bet is to remain
in one arena, either managed, or unmanaged, and stick to it.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Nadav" <an*******@discussions.microsoft.com> wrote in message
news:70**********************************@microsof t.com...
Hi,
I am about to write a performance crutial system, I am considering writing
this system based on native COM or unmanaged C++ exposed as CLI, Now, I
Wonder... does exposing a native code through CLI ( using a mixed mode DLL )
have any performance penalty? consider one Native C++ CLI assembly calling a
methos od another CLI Native C++ Assembly, will there be any marshaling
penalty, will there be any penelty at-all? is it possible to pass a direct
memory pointer ( e.g, BSTR ) from one Native CLI to the other with no
marshaling?
Nadav.