By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,017 Members | 997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,017 IT Pros & Developers. It's quick & easy.

IPC from Win32 C++ to C#

P: n/a
rob
Is there a relatively easy way to send text from a Win32 process to a
..NET process, preferably in VC++ for the Win32 side and C# for .NET.

Jun 27 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hello, rob!

r> Is there a relatively easy way to send text from a Win32 process to a
r> .NET process, preferably in VC++ for the Win32 side and C# for .NET.

It depends on that processes, if they both are GUI apps, or at least have message queue, you can use WM_COPYDATA windows message to transfer data between processes.

IMO most generic way will be usage of sockets ( TCP ).
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Jun 27 '06 #2

P: n/a
Just to add to Vadim,

see there
http://groups.google.com/group/micro...rch+this+group for the samples of using C# and WM_COPYDATA

BTW, besides sockets there is some other way of IPC. Depending on you
requirements you can choose between sockets, remoting, WebServices,
EnterpriseServives, MessageQueue

Is there a relatively easy way to send text from a Win32 process to a
..NET process, preferably in VC++ for the Win32 side and C# for .NET.


--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Jun 27 '06 #3

P: n/a
Hi,

"Michael Nemtsev" <ne*****@msn.com> wrote in message
news:07**********************************@microsof t.com...
Just to add to Vadim,

see there
http://groups.google.com/group/micro...rch+this+group
for the samples of using C# and WM_COPYDATA

BTW, besides sockets there is some other way of IPC. Depending on you
requirements you can choose between sockets, remoting, WebServices,
EnterpriseServives, MessageQueue


Not sure if you can use remoting with an unmanaged app, with webservice you
would need either another app (the service) or extend your .net app to
include it.

Another possible solution are named pipes, there is no support in .net (at
least in 1.1) but there are implementations floating around in the net.

--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Jun 27 '06 #4

P: n/a
Rob
On Tue, 27 Jun 2006 10:11:35 -0400, "Ignacio Machin \( .NET/ C# MVP
\)" <ignacio.machin AT dot.state.fl.us> wrote:
"Michael Nemtsev" <ne*****@msn.com> wrote in message
news:07**********************************@microso ft.com...
Just to add to Vadim,

see there
http://groups.google.com/group/micro...rch+this+group
for the samples of using C# and WM_COPYDATA
Good lead, thanks!
BTW, besides sockets there is some other way of IPC. Depending on you
requirements you can choose between sockets, remoting, WebServices,
EnterpriseServives, MessageQueue
Not sure if you can use remoting with an unmanaged app, with webservice you
would need either another app (the service) or extend your .net app to
include it.

Another possible solution are named pipes, there is no support in .net (at
least in 1.1) but there are implementations floating around in the net.
That's the hitch I was running into. Different technologies available
on the two platforms, but limited overlap. Sockets seemed to be
overkill and probably more effort than necessary. I even considered
clipboard, simple but aesthetically ungood. WM_COPYDATA seems a
decent compromise, even if it requires knowledge of the other
program's Window Name/Class. It affords some isolation (which the
clipboard does not).

I kept thinking I must have missed somthing, but I guess that's about
it.

--

Jun 29 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.