Bind to events raised from win service in desktop app

  • Thread starter Thread starter bz
  • Start date Start date
B

bz

Hi,

I need to create a win service that lookup a file ina folder, ands
when received, read it then fir an event.

Then I need a desktop app that, when runs, bind to the event from the
win service, and when the event fires, read the eventarg data and do
some processing with.

Can anyone point me to the right direction to do this?

I will use filesystemwatcher to detect when file changes, but don't
know from there

I know how to do this with COM (the service is a com obj defining an
interface and the desktop app implements that interface and bind to
the running service), but not sure how to do it in NET

Any advice or suggestion is appreciated.

Thank you
 
bz said:
Hi,

I need to create a win service that lookup a file ina folder, ands
when received, read it then fir an event.

Then I need a desktop app that, when runs, bind to the event from the
win service, and when the event fires, read the eventarg data and do
some processing with.

Can anyone point me to the right direction to do this?

I will use filesystemwatcher to detect when file changes, but don't
know from there

I know how to do this with COM (the service is a com obj defining an
interface and the desktop app implements that interface and bind to
the running service), but not sure how to do it in NET

Any advice or suggestion is appreciated.


You need to use .Net Remoting to allow the Service and the Desktop app to
talk to each other, which is not that easy. Dotnet Remoting replaces COM.
You can make a .Net application use a COM object too and use COM ports for
communications on a Win O/S computer -- use Google and look it up or
Dogpile.com.

Here is something that may be useful that may allow you to communicate from
one program to another.

http://www.codeproject.com/KB/cs/XDMessaging.aspx
 
Back
Top