473,394 Members | 1,715 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,394 software developers and data experts.

How to communicaton between two applications

Hi

I have lots applications are already written by C++. It 's easy to use
PostMessage in one application and catch this message in another
application's WndProc Function.
Since .net have some powerful library. I use C# to develop new
application. But I do not know how to using simlar function in C# to
communication to my exist C++ application.
Any help would be appreciate.

George chen
Nov 17 '05 #1
16 2403
Hello!
You wrote on Tue, 17 May 2005 11:42:24 -0700:

GC> Since .net have some powerful library. I use C# to develop new
GC> application. But I do not know how to using simlar function in C# to
GC> communication to my exist C++ application.

You can try MsgConnect ( http://www.eldos.com/msgconnect/ ) for this.
MsgConnect lets you communicate between applications residing on the same or
different systems easily using TCP, UDP, HTTP, memory-mapped files.

With best regards,
Eugene Mayevski

Nov 17 '05 #2
Thanks Eugene,

Since my application runs on PocketPC, I am afraid MsgConnecct can not
run on PocketPC.
I just want to find a simple method to notify each other. Here is my code
in C++:
App a:
#define WM_SCANBARCODE WM_APP + 100
::PostMessage(HWND_BROADCAST, WM_SCANBARCODE , 0, 0);
App b:
case WM_SCANBARCODE: // WM_SCANBARCODE = WM_APP + 100
break;

Thanks anyway,
George Chen


"Eugene Mayevski" <ma******@eldos.com> wrote in message
news:uQ**************@tk2msftngp13.phx.gbl...
Hello!
You wrote on Tue, 17 May 2005 11:42:24 -0700:

GC> Since .net have some powerful library. I use C# to develop new
GC> application. But I do not know how to using simlar function in C# to
GC> communication to my exist C++ application.

You can try MsgConnect ( http://www.eldos.com/msgconnect/ ) for this.
MsgConnect lets you communicate between applications residing on the same
or
different systems easily using TCP, UDP, HTTP, memory-mapped files.

With best regards,
Eugene Mayevski

Nov 17 '05 #3
Since .net have some powerful library. I use C# to develop new
application. But I do not know how to using simlar function in C# to
communication to my exist C++ application.


PostMessage can still be used.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 17 '05 #4
MSMQ?

"George Chen" <ge****@compuwave.net> wrote in message
news:uq**************@TK2MSFTNGP12.phx.gbl...
Hi

I have lots applications are already written by C++. It 's easy to use
PostMessage in one application and catch this message in another
application's WndProc Function.
Since .net have some powerful library. I use C# to develop new
application. But I do not know how to using simlar function in C# to
communication to my exist C++ application.
Any help would be appreciate.

George chen

Nov 17 '05 #5
Thanks Mattias

For the sender, PostMessage can still be used in C#.
But, for the receiver, How does it get this notification message in C#?

Thanks
George Chen

"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:ub**************@TK2MSFTNGP15.phx.gbl...
Since .net have some powerful library. I use C# to develop new
application. But I do not know how to using simlar function in C# to
communication to my exist C++ application.


PostMessage can still be used.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Nov 17 '05 #6
Hi, my friend
In order to using MSMQ, I have to rewrite my c++ appliction. but the
application is deployed to many customer already.
Thanks anyway
George

"Amil" <am********@hotmail.com> wrote in message
news:Ok**************@TK2MSFTNGP09.phx.gbl...
MSMQ?

"George Chen" <ge****@compuwave.net> wrote in message
news:uq**************@TK2MSFTNGP12.phx.gbl...
Hi

I have lots applications are already written by C++. It 's easy to use
PostMessage in one application and catch this message in another
application's WndProc Function.
Since .net have some powerful library. I use C# to develop new
application. But I do not know how to using simlar function in C# to
communication to my exist C++ application.
Any help would be appreciate.

George chen


Nov 17 '05 #7
But, for the receiver, How does it get this notification message in C#?


Override the WndProc method on the recieving form.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 17 '05 #8
Hi Mattias
I found I can override Class Form's WndProc Function from a Windows
Application.
But, Form's WndProc Function is not found from a Smart Device Application.
Only 5 protected function OnActivated, OnClosed, OnClosing, OnDeactivate and
OnLoad can be overrided. You know, compact framework has lack of
functionality.
Thanks again.

George Chen

"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:uu**************@TK2MSFTNGP10.phx.gbl...
But, for the receiver, How does it get this notification message in C#?


Override the WndProc method on the recieving form.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Nov 17 '05 #9
>Only 5 protected function OnActivated, OnClosed, OnClosing, OnDeactivate and
OnLoad can be overrided. You know, compact framework has lack of
functionality.


If you're targeting CF you can probably get better help in the group
microsoft.public.dotnet.framework.compactframework

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 17 '05 #10
Hi, Mattias
I will post my question to that group.
Thank your very much.
George Chen

"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:ex**************@TK2MSFTNGP10.phx.gbl...
Only 5 protected function OnActivated, OnClosed, OnClosing, OnDeactivate
and
OnLoad can be overrided. You know, compact framework has lack of
functionality.


If you're targeting CF you can probably get better help in the group
microsoft.public.dotnet.framework.compactframework

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Nov 17 '05 #11
http://msdn.microsoft.com/library/de...sagewindow.asp
"George Chen" <ge****@compuwave.net> wrote in message
news:uq**************@TK2MSFTNGP12.phx.gbl...
Hi

I have lots applications are already written by C++. It 's easy to use
PostMessage in one application and catch this message in another
application's WndProc Function.
Since .net have some powerful library. I use C# to develop new
application. But I do not know how to using simlar function in C# to
communication to my exist C++ application.
Any help would be appreciate.

George chen

Nov 17 '05 #12
Hello!
You wrote on Tue, 17 May 2005 12:37:57 -0700:

GC> Since my application runs on PocketPC, I am afraid MsgConnecct can
GC> not run on PocketPC.

It can. PocketPC is one of many supported platforms.

With best regards,
Eugene Mayevski
Nov 17 '05 #13
Hi George!

Inter-Process communication:
http://support.microsoft.com/kb/q95900

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Nov 17 '05 #14
ep
Use the MessageWindow class in the CF. It's there exclusively for this
purpose.

http://msdn.microsoft.com/library/de...hCallbacks.asp


"George Chen" <ge****@compuwave.net> wrote in message
news:eh*************@tk2msftngp13.phx.gbl...
Hi Mattias
I found I can override Class Form's WndProc Function from a Windows
Application.
But, Form's WndProc Function is not found from a Smart Device Application. Only 5 protected function OnActivated, OnClosed, OnClosing, OnDeactivate and OnLoad can be overrided. You know, compact framework has lack of
functionality.
Thanks again.

George Chen

"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:uu**************@TK2MSFTNGP10.phx.gbl...
But, for the receiver, How does it get this notification message in
C#?
Override the WndProc method on the recieving form.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.


Nov 17 '05 #15
How about using C# P/Invoke to call the BroadcastSystemMessage API function?
I use the BroadcastSystemMessage/BroadcastSystemMessageEx all the time to
send messages between C++ applications. Should work with C# too.

"George Chen" wrote:
Hi

I have lots applications are already written by C++. It 's easy to use
PostMessage in one application and catch this message in another
application's WndProc Function.
Since .net have some powerful library. I use C# to develop new
application. But I do not know how to using simlar function in C# to
communication to my exist C++ application.
Any help would be appreciate.

George chen

Nov 17 '05 #16
You can also use Named Pipes. Named Pipes are quite useful because they can
not only be used by two apps on the same machine, but they can also be used
by two apps on different machines (without stating the obvious that each
machine can "see" the other on a network.)

"Mike V." <Mike V.@discussions.microsoft.com> wrote in message
news:B0**********************************@microsof t.com...
How about using C# P/Invoke to call the BroadcastSystemMessage API function? I use the BroadcastSystemMessage/BroadcastSystemMessageEx all the time to
send messages between C++ applications. Should work with C# too.

"George Chen" wrote:
Hi

I have lots applications are already written by C++. It 's easy to use
PostMessage in one application and catch this message in another
application's WndProc Function.
Since .net have some powerful library. I use C# to develop new
application. But I do not know how to using simlar function in C# to
communication to my exist C++ application.
Any help would be appreciate.

George chen

Nov 17 '05 #17

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

Similar topics

0
by: Constandinos Mavromoustakis | last post by:
CFP: CLADE 2004-Challenges of Large Applications in Distributed Environments ------------------------------------------------- PhD student - Dept.Informatics at Aristotle University of...
0
by: John Davis | last post by:
I came across a new term "web portal applications." Anyone can tell me what's the differences between web portal applications versus traditional web applications?? Portal applications only runs on...
1
by: Tom Q | last post by:
A user has multiple applications running on his/her PC and I want to create a broker component or service that is shared among the multiple apps. Each time an application changes a record it...
1
by: George Chen | last post by:
Hi I have lots applications are already written by C++. It 's easy to use PostMessage in one application and catch this message in another application's WndProc Function. Since .net have some...
385
by: Xah Lee | last post by:
Jargons of Info Tech industry (A Love of Jargons) Xah Lee, 2002 Feb People in the computing field like to spur the use of spurious jargons. The less educated they are, the more they like...
6
by: Ray | last post by:
DB2 V7.2 Is it possible to list applications connected to a node by Auth ID? Is it possible to force applications connected to a node by Auth ID or am I forced to use App. Handle? Thanks, Ray
6
by: Terry Bell | last post by:
We've had a very large A97 app running fine for the last seven years. I've just converted to SQL Server backend, which is being tested, but meanwhile the JET based version, running under terminal...
5
by: Prakash T. | last post by:
Dear friends, This is Prakash from in India at tamilnadu. I am a MCA Student. Please answer the Que: Mention the type of applications which can be developed using C language? Thanks and...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.