473,406 Members | 2,377 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,406 software developers and data experts.

interprocesscommunication

Hello!

Assume I have several exe files running and all these constitute the actual
application.

To be able to log errors and different types of trace my intention is to
have a separate exe file that take care of the actual writing to a file.
Between the exe files(application) and the exe file that is handle the
writing of errors and trace my intention is to use interprocess
communication.
I have used interprocesscommunication when I worked with C++ but not in C#.

Now I wonder can anybody give me a hint about where to find some example
about which classes and so on to use for this matter.

By the way is interprocesscommunication the best way to send message between
processes when working with C#.
//Tony
Feb 21 '07 #1
7 1683
You need remoting - either the .NET Remoting Framework kind or via Web
services, I would think:

http://msdn2.microsoft.com/en-us/library/kwdt6w2k.aspx

http://msdn2.microsoft.com/en-us/library/kwdt6w2k.aspx

Peter

"TonyJ" <jo*****************@telia.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hello!

Assume I have several exe files running and all these constitute the
actual
application.

To be able to log errors and different types of trace my intention is to
have a separate exe file that take care of the actual writing to a file.
Between the exe files(application) and the exe file that is handle the
writing of errors and trace my intention is to use interprocess
communication.
I have used interprocesscommunication when I worked with C++ but not in
C#.

Now I wonder can anybody give me a hint about where to find some example
about which classes and so on to use for this matter.

By the way is interprocesscommunication the best way to send message
between
processes when working with C#.
//Tony


Feb 21 '07 #2
By the way, why are you building all these separate executables? Why don't
you just build a main class that has the application entry point, and
several class libraries (DLLs) that you can reference? Then you won't need
all this IPC stuff.

Is there some reason that they must be running in separate executable
assemblies? Do they have to run on separate machines, for instance?

Maybe you're just worried about making sure that all the other classes all
use the same instance of your error handling class, for some reason? If so,
just pass a reference to it to its clients.
Peter

"Peter Bradley" <pb******@uwic.ac.ukwrote in message
news:%2***************@TK2MSFTNGP03.phx.gbl...
You need remoting - either the .NET Remoting Framework kind or via Web
services, I would think:

http://msdn2.microsoft.com/en-us/library/kwdt6w2k.aspx

http://msdn2.microsoft.com/en-us/library/kwdt6w2k.aspx

Peter

"TonyJ" <jo*****************@telia.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>Hello!

Assume I have several exe files running and all these constitute the
actual
application.

To be able to log errors and different types of trace my intention is to
have a separate exe file that take care of the actual writing to a file.
Between the exe files(application) and the exe file that is handle the
writing of errors and trace my intention is to use interprocess
communication.
I have used interprocesscommunication when I worked with C++ but not in
C#.

Now I wonder can anybody give me a hint about where to find some example
about which classes and so on to use for this matter.

By the way is interprocesscommunication the best way to send message
between
processes when working with C#.
//Tony



Feb 21 '07 #3

"TonyJ" <jo*****************@telia.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hello!

Assume I have several exe files running and all these constitute the
actual
application.

To be able to log errors and different types of trace my intention is to
have a separate exe file that take care of the actual writing to a file.
Between the exe files(application) and the exe file that is handle the
writing of errors and trace my intention is to use interprocess
communication.
I have used interprocesscommunication when I worked with C++ but not in
C#.

Now I wonder can anybody give me a hint about where to find some example
about which classes and so on to use for this matter.

By the way is interprocesscommunication the best way to send message
between
processes when working with C#.
Interprocess Communications is a very generic term, any method for passing
messages between processes qualifies. There are many implementations of IPC
including pipes, sockets, shared memory, RPC, mailslots, and filesystem
polling, just to name a few.

For what you describe, a mailslot or datagram socket would be suitable. But
maybe you should just use the existing standard (syslog).
Feb 21 '07 #4
Hello!!

I just wonder about one thing. Assume I have one main and several dll as you
mentioned and I open a dialog in one dll and
then I want to close down the executable(exe.-file)
How is this done?

//Tony
"Peter Bradley" <pb******@uwic.ac.ukskrev i meddelandet
news:#A**************@TK2MSFTNGP02.phx.gbl...
By the way, why are you building all these separate executables? Why
don't
you just build a main class that has the application entry point, and
several class libraries (DLLs) that you can reference? Then you won't
need
all this IPC stuff.

Is there some reason that they must be running in separate executable
assemblies? Do they have to run on separate machines, for instance?

Maybe you're just worried about making sure that all the other classes all
use the same instance of your error handling class, for some reason? If
so,
just pass a reference to it to its clients.
Peter

"Peter Bradley" <pb******@uwic.ac.ukwrote in message
news:%2***************@TK2MSFTNGP03.phx.gbl...
You need remoting - either the .NET Remoting Framework kind or via Web
services, I would think:

http://msdn2.microsoft.com/en-us/library/kwdt6w2k.aspx

http://msdn2.microsoft.com/en-us/library/kwdt6w2k.aspx

Peter

"TonyJ" <jo*****************@telia.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hello!

Assume I have several exe files running and all these constitute the
actual
application.

To be able to log errors and different types of trace my intention is
to
have a separate exe file that take care of the actual writing to a
file.
Between the exe files(application) and the exe file that is handle the
writing of errors and trace my intention is to use interprocess
communication.
I have used interprocesscommunication when I worked with C++ but not in
C#.

Now I wonder can anybody give me a hint about where to find some
example
about which classes and so on to use for this matter.

By the way is interprocesscommunication the best way to send message
between
processes when working with C#.
//Tony



Feb 22 '07 #5
It's unusual to want to close the form associated with the main executable,
but if you must close that form then there are several ways of doing it.
Probably the simplest way is to hide it. You can do this from any of your
other forms as long as they have access to a reference to your "main" form.
To ensure they do have a reference you could provide them each with a
constructor that takes a reference to the main form (plus any other
parameters you may need to pass in).

So, when your main form opens a dialog it could say:

MyDialog md = new MyDialog(this);
md.Show(); // or md.Visible = false;

Then in the dialog constructor, you can say:

public class MyDialog : Form // or whatever
{
private MainForm mf;

public MyDialog(MainForm mf)
{
// other constructor stuff
this.mf = mf;
mf.Visible = false; // Hide the main form or mf.Hide();
// other constructor stuff
}

...

}

HTH
Peter
"TonyJ" <jo*****************@telia.comwrote in message
news:eh**************@TK2MSFTNGP03.phx.gbl...
Hello!!

I just wonder about one thing. Assume I have one main and several dll as
you
mentioned and I open a dialog in one dll and
then I want to close down the executable(exe.-file)
How is this done?

//Tony
"Peter Bradley" <pb******@uwic.ac.ukskrev i meddelandet
news:#A**************@TK2MSFTNGP02.phx.gbl...
>By the way, why are you building all these separate executables? Why
don't
>you just build a main class that has the application entry point, and
several class libraries (DLLs) that you can reference? Then you won't
need
>all this IPC stuff.

Is there some reason that they must be running in separate executable
assemblies? Do they have to run on separate machines, for instance?

Maybe you're just worried about making sure that all the other classes
all
use the same instance of your error handling class, for some reason? If
so,
>just pass a reference to it to its clients.
Peter

"Peter Bradley" <pb******@uwic.ac.ukwrote in message
news:%2***************@TK2MSFTNGP03.phx.gbl...
You need remoting - either the .NET Remoting Framework kind or via Web
services, I would think:

http://msdn2.microsoft.com/en-us/library/kwdt6w2k.aspx

http://msdn2.microsoft.com/en-us/library/kwdt6w2k.aspx

Peter

"TonyJ" <jo*****************@telia.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hello!

Assume I have several exe files running and all these constitute the
actual
application.

To be able to log errors and different types of trace my intention is
to
>have a separate exe file that take care of the actual writing to a
file.
>Between the exe files(application) and the exe file that is handle the
writing of errors and trace my intention is to use interprocess
communication.
I have used interprocesscommunication when I worked with C++ but not
in
C#.

Now I wonder can anybody give me a hint about where to find some
example
>about which classes and so on to use for this matter.

By the way is interprocesscommunication the best way to send message
between
processes when working with C#.
//Tony




Feb 22 '07 #6
Hello!
If I want to have good performance for being able to get message from all
the different exe files and then write these message down to a file
which one should I then use for IPC.

//Tony

"Ben Voigt" <rb*@nospam.nospamskrev i meddelandet
news:eG**************@TK2MSFTNGP05.phx.gbl...
>
"TonyJ" <jo*****************@telia.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hello!

Assume I have several exe files running and all these constitute the
actual
application.

To be able to log errors and different types of trace my intention is to
have a separate exe file that take care of the actual writing to a file.
Between the exe files(application) and the exe file that is handle the
writing of errors and trace my intention is to use interprocess
communication.
I have used interprocesscommunication when I worked with C++ but not in
C#.

Now I wonder can anybody give me a hint about where to find some example
about which classes and so on to use for this matter.

By the way is interprocesscommunication the best way to send message
between
processes when working with C#.

Interprocess Communications is a very generic term, any method for passing
messages between processes qualifies. There are many implementations of
IPC
including pipes, sockets, shared memory, RPC, mailslots, and filesystem
polling, just to name a few.

For what you describe, a mailslot or datagram socket would be suitable.
But
maybe you should just use the existing standard (syslog).


Feb 23 '07 #7
"TonyJ" <jo*****************@telia.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Hello!
If I want to have good performance for being able to get message from all
the different exe files and then write these message down to a file
which one should I then use for IPC.

//Tony
Take a look at the System.Runtime.Remoting namespace in V2 or System.ServiceModel in V3
(WCF) .

With System.Remoting (V2), the best performance can be obtained when using IpcServerChannel
(namespace System.Runtime.Remoting.Channels.Ipc), which uses named pipes under the covers.
WCF offers the NetNamedPipeBinding which uses shared memory under the covers.

Willy.

Feb 23 '07 #8

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

Similar topics

1
by: Mehmet Turker | last post by:
Hi; In a research project, I want to use shared memory with semaphores. First I have to create an environment for interprocess messaging. I'm thinking of having a main process which creates a big...
2
by: victor | last post by:
Hi, I'm working on a project involving .NET Frwk and legacy MFC app's. Within the MFC sub-project there exists several IPC's, using FindWindow and then PostMessage; they all works fine. My...
44
by: climber.cui | last post by:
Hi all, Does anyone have experience on the thread-safty issue with malloc()? Some people said this function provided in stdlib.h is not thread- safe, but someone said it is thread safe. Is it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.