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

Re: Bind to events raised from win service in desktop app by Mr

Mr
Mon Apr 28 18:05:14 CDT 2008


"bz" <bzamfir@gmail.com> wrote in message
news:040e26fa-2c4d-49da-9b04-bb02efca93c7@y38g2000hsy.googlegroups.com...
> 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


Re: Bind to events raised from win service in desktop app by bz

bz
Tue Apr 29 09:39:07 CDT 2008

This links is very interesting, I'll check this concept

Thank you



On Apr 29, 2:05=A0am, "Mr. Arnold" <MR. Arn...@Arnold.com> wrote:
> "bz" <bzam...@gmail.com> wrote in message
>
> news:040e26fa-2c4d-49da-9b04-bb02efca93c7@y38g2000hsy.googlegroups.com...
>
>
>
>
>
> > 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 =A0-- use Google and look it up or
> Dogpile.com.
>
> Here is something that may be useful that may allow you to communicate fro=
m
> one program to another.
>
> http://www.codeproject.com/KB/cs/XDMessaging.aspx- Hide quoted text -
>
> - Show quoted text -