Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - how to communicate between two process in .net ?

Reply
 
Old 11-07-2008   #1 (permalink)
Duy Lam


 
 

how to communicate between two process in .net ?


Hi,

My project got a problem that is relevant to the communication between
processes.However, I don't know what technique is used in my case.

I'm implementing two applications called AppMain and AppEventHandler.
The AppMain is responsible for creating a new document Word file by
using a third-party framework, say FrwDocFile. And the job of
AppEventHandler is to generate filename for document.

The logic flow would be like this: when AppMain sends a creating file
request to the FrwDocFile (by calling a method), the FrwDocFile will do
necessary steps and then launch AppEventHandler as asynchronous
background thread to generate file name for document. After that the
execution control returns AppMain but the AppMain need to know the
document file name before it does any further processing task. However,
the document file name is generated by AppEventHandler in another
thread. So this requirement makes the AppMain have to wait for
AppEventHandler completed.

From that point, the AppMain and AppEventHandler will be run in two
different processes and they need to "talk" together. Specially, the
AppEventHandler need to send a message (file name) to AppMain while the
AppMain is waiting that message from AppEventHandler. And it comes to
this topic .

The google gave me this url
(http://msdn.microsoft.com/en-us/libr...74(VS.85).aspx) but these
techniques is used in native win32 platform but I prefer using .net. I
also thought about WCF (actually, my project is developed in
service-oriented programming with WCF) but the AppEventHandler can't use
configuration file. That's the requirement for AppEventHandler .

I'm thinking about something like pipe because this technique can be
used for communicating between two processes in the same machine (my
case). But the pipe isn't available in .net or I don't know how to use
it .

Can you suggest me any technique to resolve this ?

Thank you


--
Thanks,
Duy Lam

My System SpecsSystem Spec
Old 11-08-2008   #2 (permalink)
Duy Lam


 
 

Re: how to communicate between two process in .net ?

I found out the solution after taking a look on System.IO.Pipe
namespace. It's ok for my case


Duy Lam wrote:
Quote:

>
> Hi,
>
> My project got a problem that is relevant to the communication between
> processes.However, I don't know what technique is used in my case.
>
> I'm implementing two applications called AppMain and AppEventHandler.
> The AppMain is responsible for creating a new document Word file by
> using a third-party framework, say FrwDocFile. And the job of
> AppEventHandler is to generate filename for document.
>
> The logic flow would be like this: when AppMain sends a creating file
> request to the FrwDocFile (by calling a method), the FrwDocFile will do
> necessary steps and then launch AppEventHandler as asynchronous
> background thread to generate file name for document. After that the
> execution control returns AppMain but the AppMain need to know the
> document file name before it does any further processing task. However,
> the document file name is generated by AppEventHandler in another
> thread. So this requirement makes the AppMain have to wait for
> AppEventHandler completed.
>
> From that point, the AppMain and AppEventHandler will be run in two
> different processes and they need to "talk" together. Specially, the
> AppEventHandler need to send a message (file name) to AppMain while the
> AppMain is waiting that message from AppEventHandler. And it comes to
> this topic .
>
> The google gave me this url
> (http://msdn.microsoft.com/en-us/libr...74(VS.85).aspx) but these
> techniques is used in native win32 platform but I prefer using .net. I
> also thought about WCF (actually, my project is developed in
> service-oriented programming with WCF) but the AppEventHandler can't use
> configuration file. That's the requirement for AppEventHandler .
>
> I'm thinking about something like pipe because this technique can be
> used for communicating between two processes in the same machine (my
> case). But the pipe isn't available in .net or I don't know how to use
> it .
>
> Can you suggest me any technique to resolve this ?
>
> Thank you
>
>
--
Thanks,
Duy Lam
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Failover Guest Cluster -- 'The process cannot access the file becauseit is being used by another process.' Virtual Server
applications communicate via TCP/IP System Security
cannot communicate with dns server Vista hardware & devices
Process count wrong when only one process matches criteria PowerShell
Bug? Shouldn't Stop-Process automatically match Id if object is a process? PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46