Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Send message from C# to C++

59 views
Skip to first unread message

Magdy Wageeh

unread,
Jun 9, 2009, 8:06:30 AM6/9/09
to
{ multi-posted to [comp.lang.c++]. -mod }

Hello,

I have two applications, one c# and another c++. I want the c# one to
run the c++ application and sends message (ex. string ... certain data
needed to initialize the c++ application) to it.

Please, help me... how to implement that in both sides (C# sends
message & C++ receives it)

Any thoughts, ideas, advice will be highly appreciated. :-)
Thanks!

--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

co...@mailvault.com

unread,
Jun 10, 2009, 10:06:31 AM6/10/09
to
On Jun 9, 7:06 am, Magdy Wageeh <magdy....@gmail.com> wrote:
> { multi-posted to [comp.lang.c++]. -mod }
>
> Hello,
>
> I have two applications, one c# and another c++. I want the c# one to
> run the c++ application and sends message (ex. string ... certain data
> needed to initialize the c++ application) to it.
>
> Please, help me... how to implement that in both sides (C# sends
> message & C++ receives it)
>
> Any thoughts, ideas, advice will be highly appreciated. :-)
> Thanks!
>


It would be easier if both apps were C# or both were C++. I'd
recommend making them both C++ if possible. If changing the
configuration isn't an option, you can still do what you want,
but a Corba-like solution will probably be more complicated and
fragile.


Brian Wood
Ebenezer Enterprises
www.webEbenezer.net

blackbiscuit

unread,
Jun 10, 2009, 10:07:42 AM6/10/09
to
On 6月9日, 下午8時06分, Magdy Wageeh <magdy....@gmail.com> wrote:
> { multi-posted to [comp.lang.c++]. -mod }
>
> Hello,
>
> I have two applications, one c# and another c++. I want the c# one to
> run the c++ application and sends message (ex. string ... certain data
> needed to initialize the c++ application) to it.
>
> Please, help me... how to implement that in both sides (C# sends
> message & C++ receives it)
>
> Any thoughts, ideas, advice will be highly appreciated. :-)
> Thanks!

{ quoted sig & banner removed. don't quote extraneous material. tia., -mod }

Hi,

Maybe you can think of pipe or socket? Just open a pipr/socket on the
C# side and write data into it and then open that pipe/socket on the C+
+ side and read data from it.

Wish it is helpful for you!

Best Regards,
Tony

Goran

unread,
Jun 10, 2009, 4:10:36 PM6/10/09
to
This really has absolutely nothing to do with C# or C++. It's about
inter-process communication.

See

www.linuxhq.com/guides/TLK/ipc/ipc.html
http://msdn.microsoft.com/en-us/library/aa365574(VS.85).aspx

Goran.

Magdy Wageeh

unread,
Jun 10, 2009, 9:26:04 PM6/10/09
to
{ Please delete any irrelevant material from your quoting. -mod }


On Jun 9, 3:06 pm, Magdy Wageeh <magdy....@gmail.com> wrote:
> { multi-posted to [comp.lang.c++]. -mod }
>
> Hello,
>
> I have two applications, one c# and another c++. I want the c# one to
> run the c++ application and sends message (ex. string ... certain data
> needed to initialize the c++ application) to it.
>
> Please, help me... how to implement that in both sides (C# sends
> message & C++ receives it)
>
> Any thoughts, ideas, advice will be highly appreciated. :-)
> Thanks!
>
> --

> [ Seehttp://www.gotw.ca/resources/clcm.htmfor info about ]


> [ comp.lang.c++.moderated. First time posters: Do this! ]

Thanks both of you!
I used the Process & StartInfo in c# and sent data in arguments using
the command line to c++.

Although it might not be the best solution, it fits in my case ...
very simple. :-)

0 new messages