473,320 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

CLI Marshaling

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.
Nov 16 '05 #1
1 2447
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.

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ash | last post by:
Hi, Has anyone ever tried using "COM marshaling" for cross- process communication? In particular, I am interested in cross-process marshaling between Managed Server and Unmanaged Client. ...
3
by: Nikolay Petrov | last post by:
Guys, please help. I am trying to make this work from at least 4 months. I am new to programming and some things are difficult to me, but I really need to make my project work. I can't find...
4
by: Vadym Stetsyak | last post by:
Hi there!!! I'm looking for any resources on the subject. Any help will be appreciated! -- Vadym Stetsyak ICQ 161730125 He, who commands the past - commands the future
3
by: Stephen Gennard | last post by:
Hello, I having a problem dynamically invoking a static method that takes a reference to a SByte*. If I do it directly it works just fine. Anyone any ideas why? I have include a example...
5
by: VM | last post by:
What's marshalling? I've had to use it extensively for a project but I don't know what it means. I tried to look for a definition in the Internet but I couldn't find anything that would explain...
3
by: Rudy Velthuis | last post by:
Hello, Does anyone know how to create a struct that will marshal to the following C++ struct A, containing an array of the user defined String10 type: struct String10 { char SLen; char S;
4
by: MSDousti | last post by:
Hi all, I read some Q&As in the Net, discussing Marshalization of nested structs in C# (or VB.NET). Some guys stated that .NET framework does not support this feature yet. Are they right? ...
1
by: Bill Medland | last post by:
I am trying to do some P/Invoke custom marshaling and am looking for a little help on custom marshaling a value type. I am working based on Kate Gregory's "Arranging Custom Marshaling With...
0
by: jpogorman | last post by:
Hello, I am trying to get c# custom marshaling working in a particular scenario but it does not appear to be working or not jumping into my marshaling class when I try to debug it. I am try to...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.