![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | 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 Specs![]() |
| | #2 (permalink) |
| | 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 Specs![]() |
![]() |
| 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 | |||