[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Send a simple message between two Windows Apps running on same PC at the same time

Posted on 2005-04-06
5
Medium Priority
?
427 Views
Last Modified: 2010-04-16
Let's say I have 2 windows applications written in C#, AppOne and AppTwo.

AppOne has a TextBox and a "Send" Button

AppTwo has a TextBox.

I start AppOne, then I start AppTwo next...both on the same PC.

I type "hello" into the TextBox on AppOne and click the "Send" Button.

The word "hello" shows up now in the TextBox on AppTwo.

=========================

Please provide complete C# source code for AppOne and AppTwo.


CONDITIONS:

I do not want to use TCP or UDP to do this unless there is NO other way.

I want to set up a true PIPE between the two applications.....in other words...no slight of hand with processes or send keys or sharing a text file....I want the "best practice" way to do this.  

For example, is what I am describing handled best by Remoting ... or Named Pipes?


Thanks,

Tom

0
Comment
Question by:Tom Knowlton
  • 2
  • 2
5 Comments
 
LVL 8

Accepted Solution

by:
RomanPetrenko earned 1000 total points
ID: 13720253
Remoting also uses TCP or HTTP.
I think you want to do this using .NET features and not using windows API through PInvoke?

Remoting will be good for you - read this article:

http://msdn.microsoft.com/msdnmag/issues/02/10/NETRemoting/default.aspx


0
 
LVL 3

Assisted Solution

by:stu_pb
stu_pb earned 1000 total points
ID: 13720277
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 13721060
>>>>I think you want to do this using .NET features and not using windows API through PInvoke?


This sounds like what I want....the .NET libraries way to do it.


Let me read your link and also stu's link....and see where that leaves me......


Thanks both of you!!


Tom
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 13721128
Named Pipes are wrappers around Kernal32.dll is my understanding.....that is ... for them to work in .NET?


Both Remoting and Named Pipes seems to take lots of setup.

It seems like overkill for the simple task I am asking to do......
0
 
LVL 3

Expert Comment

by:stu_pb
ID: 13725693
Other than using files to communicate I think you will probably have to choose between Remoting and Named Pipes, I haven't been able to find any simpler examples.

Good Luck!
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question