C++ <-> C# communication

  • Thread starter Giovanni Dicanio
  • Start date
G

Giovanni Dicanio

Hi,

I'm going to write a shell extension, and for this purpose I use C++ and
ATL.

The shell extension should then show a GUI window, and the user will
interact with the controls contained in this window.
I'd like to develop this GUI part in C# (I'd like to write two versions, one
using WinForm and another one using WPF, to do some comparisons).

However, the problem is the communication between the C++/ATL part and the
C# GUI part.
I thought about passing some data using the command line, i.e.

- make the C# GUI part a standalone .exe
- the C++/ATL shell extension calls the C# GUI .exe passing data using
command line

My questions are:

1. Does it exist a limit to the total length of command line string?

2. Is there another way to do communication between C++/ATL and C# .exe ?
(e.g. if I had to pass binary data and not text data, the command line
technique would not be good)

(Another option would be to write the shell extension as single C++/ATL
module, using WTL for the GUI part.)

Thanks in advance,
Giovanni
 
S

SvenC

Hi Giovanni,
I'm going to write a shell extension, and for this purpose I use C++
and ATL.

The shell extension should then show a GUI window, and the user will
interact with the controls contained in this window.
I'd like to develop this GUI part in C# (I'd like to write two
versions, one using WinForm and another one using WPF, to do some
comparisons).

Microsoft does not support writing shell extensions in .Net.
You will need to implement your C# GUI as standalone exe and
use some inter process communication like COM, remoting or similar
to comunicate with your ATL shell extension.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top