Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WCF C#3.5
I have two applications, one Windows Service, second Windows Forms application. What would be the best way to send a message (its a small string 10 character length) from Windows Service to Windows Forms.
 
Any simple approach is highly appreciated.
 
Thanks,
Kishore
Posted 9-Dec-09 0:16am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You might use common storage to update this. Place your data in Registry / diskfile or whereever you want, and access it from both the process. This is the easiest.
 
Other than that, you might also use Named Pipes to send messages between two processes. Read this :
 
http://www.switchonthecode.com/tutorials/interprocess-communication-using-named-pipes-in-csharp[^]
http://www.codeguru.com/Csharp/Csharp/cs_network/remoting/article.php/c7259/[^]
 
Wink | ;)
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I think the simplest would be to have a function in your form that queries the service, and returns the value.
 
You can put it in a thread, or a timer.
 
I Agree With Answer 2.
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 390
1 Jochen Arndt 150
2 Richard MacCutchan 135
3 DamithSL 95
4 Garth J Lancaster 90
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,260


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 13 Jan 2010
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100