473,671 Members | 2,271 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best IPC mechanism between managed C# and unmanaged C++

Bob
The question about IPC between managed vs unmanaged comes up once in a
while, and I generally see "Named Pipes" as the answer. But I was
wondering if there is anything new.

The app in this case will only be sharing short strings for the most
part, and the C++ part will eventually be rewritting in C#. So I'm
looking for anything that's fast and easy, but also not too ugly. Is
it still necessary to use named pipes?
Nov 21 '08 #1
2 6136
On Nov 21, 11:40*am, Bob <B...@nospam.co mwrote:
The question about IPC between managed vs unmanaged comes up once in a
while, and I generally see "Named Pipes" as the answer. But I was
wondering if there is anything new. *

The app in this case will only be sharing short strings for the most
part, and the C++ part will eventually be rewritting in C#. So I'm
looking for anything that's fast and easy, but also not too ugly. Is
it still necessary to use named pipes?
Do you actually need _inter-process_ communication? If so, named pipes
are still the fastest available communication mechanism for that, and
relatively easy to use as well, no matter whether you're using C++ or
C#.
Nov 21 '08 #2
Bob,

I would use some managed C++ in there and use WCF to communicate between
the two apps (whether or not you use named pipes as a channel becomes less
of an issue if you use WCF). This way, you don't have to worry about the
intra-process code when you move the C++ code to C#.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Bob" <Bo*@nospam.com wrote in message
news:sn******** *************** *********@4ax.c om...
The question about IPC between managed vs unmanaged comes up once in a
while, and I generally see "Named Pipes" as the answer. But I was
wondering if there is anything new.

The app in this case will only be sharing short strings for the most
part, and the C++ part will eventually be rewritting in C#. So I'm
looking for anything that's fast and easy, but also not too ugly. Is
it still necessary to use named pipes?

Nov 21 '08 #3

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

Similar topics

1
741
by: Bob Rock | last post by:
Hello, in the last few days I've made my first few attempts at creating mixed C++ managed-unmanaged assemblies and looking aftwerwards with ILDASM at what is visible in those assemblies from a managed point-of-view I've noticed that: 1) for each managed and unmanaged C function (not C++ classes) I get a public managed static method (defined on a 'Global Functions' class) in the generated assembly with an export name of the form...
5
3626
by: Chris Kiechel | last post by:
I am writing a .NET Windows application and it needs to perform DDE calls to a legacy system. I created a C++ unmanaged class that performs the actual DDE connection and communication. However, I need .NET to instantiate this object and somehow allow the this object to callback to .NET. So, my question is: 1. How can a managed class instantiate and unmanaged class?
4
2522
by: 0to60 | last post by:
I'm trying to create a .dll with VS.NET 2003 Architect that contains a math computational component. I need the guts of the thing to be in native code, as performance is key for that part. But, I need a .net wrapper because this "calculator" is actually a component used by an enterprise app written entirely in .net. What I want to do is have one project. I've created an MC++ .dll project. Its got a __gc class (the wrapper) and a...
0
2691
by: Johannes Unfried | last post by:
Problem Best practice needed to marshal STL data from managed code to unmanaged code & vice vers Details managed code is written in managed C++ & accesses the unmanaged code (i.e. lives in a mixed mode DLL unmanaged code is written in unmanaged C++ & resides in an unmanaged DL Product used is VS.NET 200 Please tell me what is the best practice for getting and setting data fro unmanaged to managed part when I have a class with...
3
3500
by: zhphust | last post by:
I want to convert a object of a managed class to a unmanaged structure that has the same member with that managed class. Can anybody tell me how i can do it? Thanks in advance. -- zhphust ------------------------------------------------------------------------
4
1256
by: Bae,Hyun-jik | last post by:
Hi, What is the best case for accessing managed code from unmanaged C++ code, considering that the unmanaged code doesn't have managed extension? Please reply. Thanks in advance. Regards, Hyun-jik Bae
3
2766
by: Thorsten | last post by:
HI I'm a C# developer and unfortunately I have to write now some code in managed and unmanaged C++. In this area I'm Newbie and therefore please forgive me if this is a really simple question.
5
1500
by: | last post by:
Hi, In our system we get image buffers through a native dll as void*. We want to manage several of this blocks by C# objects an pass them wen needed to a native image processing library. What is the best way to do this? Can I just declare a unsafe pointer as member of a class? Best regards
20
10026
by: Joe | last post by:
Is any one charting packing considered to be the "best"? We've used ChartFX but wasn't too happy about the way data had to be populated along with some other issues which slip my mind right now and Dundas has bugs and doesn't do a good enough job displaying axis labels and is very slow to paint large numbers of series and data points. We're currently evaluating ProEssentials which we are happy with but it's not a native .NET package. ...
0
8473
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8597
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8667
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6222
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5692
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4402
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2808
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2048
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.