473,836 Members | 2,135 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

BInd to events from win service from desktop application

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 filesystemwatch er 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
Jun 27 '08 #1
4 1654
On Apr 28, 8:02 am, bz <bzam...@gmail. comwrote:
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 filesystemwatch er 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
One easy approach is to start off a new process(desktop app) with
appropriate arguments everytime the file changes.
Jun 27 '08 #2
bz
Hi,

This doesn't works, because I don't want to desktop process to open
everytime.
The service must do what it is designed to do, and the desktop is just
a monitor, users can choose to start when they want to see the status
of service processing.

It might not be started for days, for example

Any other thought?

On Apr 28, 6:14*pm, parez <psaw...@gmail. comwrote:
On Apr 28, 8:02 am, bz <bzam...@gmail. comwrote:


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 filesystemwatch er 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

One easy approach is to start off a new process(desktop app) *with
appropriate arguments everytime the file changes.- Hide quoted text -

- Show quoted text -
Jun 27 '08 #3
On Apr 29, 10:25 am, bz <bzam...@gmail. comwrote:
Hi,

This doesn't works, because I don't want to desktop process to open
everytime.
The service must do what it is designed to do, and the desktop is just
a monitor, users can choose to start when they want to see the status
of service processing.

It might not be started for days, for example

Any other thought?

On Apr 28, 6:14 pm, parez <psaw...@gmail. comwrote:
On Apr 28, 8:02 am, bz <bzam...@gmail. comwrote:
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 filesystemwatch er 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
One easy approach is to start off a new process(desktop app) with
appropriate arguments everytime the file changes.- Hide quoted text -
- Show quoted text -
then you will have to use some better form of IPC .. named pipes,
remoting or MSMQ
http://www.google.com/search?hl=en&r...et&btnG=Search

Jun 27 '08 #4
bz
Thank you, I'll check them

On May 1, 5:28*pm, parez <psaw...@gmail. comwrote:
On Apr 29, 10:25 am, bz <bzam...@gmail. comwrote:


Hi,
This doesn't works, because I don't want to desktop process to open
everytime.
The service must do what it is designed to do, and the desktop is just
a monitor, users can choose to start when they want to see the status
of service processing.
It might not be started for days, for example
Any other thought?
On Apr 28, 6:14 pm, parez <psaw...@gmail. comwrote:
On Apr 28, 8:02 am, bz <bzam...@gmail. comwrote:
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 filesystemwatch er 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
One easy approach is to start off a new process(desktop app) *with
appropriate arguments everytime the file changes.- Hide quoted text -
- Show quoted text -

then you will have to use some better form of IPC .. named pipes,
remoting or MSMQ

http://www.google.com/search?hl=en&r...&q=Compare...- Hide quoted text -

- Show quoted text -
Jun 27 '08 #5

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

Similar topics

15
2149
by: Chakkaradeep | last post by:
Hi all, i have written a Service,now i want to execute another application (for eg;calc.exe) in the service....how will i perform it??... i tried using this.... /**************Executing a Process code starts here**************/ System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.EnableRaisingEvents=false;
9
3409
by: esafran | last post by:
Hi, I've have encountered a very strange behaviour under C#. My application is registering for: Microsoft.Win32.SystemEvents.DisplaySettingsChanged & Microsoft.Win32.SystemEvents.UserPreferenceChanged When I run my application as a Console Application (not as a service), my application receives the events when I change the screen resolution or change from Dual View to Horizontal Span or to Single View.
6
3048
by: Bijesh | last post by:
Hi All, I've developed a Windows Service that acts as a remoting server (.NET Remoting). The client(user) is able to connect to the server and start a program by giving the executable path of the program (in the server) along with the working directory and the arguments (parameters). This works fine if I try to start programs whose executable file is present witin the local drives of the server. If the application is in a netwok drive,...
3
1845
by: Saran | last post by:
I have a windows service which instantiates the Powerpoint Application using PIA. When I am running this windows service am not able to open the Microsoft powerpoint application. This problem happens in XP and win 2000, Where as the same works fine in win 2003 server. Any suggestions to make this work in XP and Win 2000.
3
4616
by: Lubomir | last post by:
Hi, I read that interactive windows services will not be allowed to run under Wista. I would like to ask what exactly is the interactive service. It is supposed to be a service that communicates with desktop. What about the following scenario: A service will create a thread. This thread will create and run an UI Windows application that manages task bar and so on on a desktop. This application will communicate with the service: a/ by...
7
2422
by: Ahmed Perlom | last post by:
Hi all, I am trying to start a windows application that has a GUI from a Windows service written in .NET 2.0. I have been searching on this for few days now with no avail. When using the System.Diagnostic.Process object to start the application (i.e Notepad), the new app runs and it is listed on the task manger list, but the GUI doesn't show up in the desktop of the current user. I am aware windows service (either LocalSystem,...
4
5273
by: Don Curtis | last post by:
If I use GDI+ within a service, what problems can I expect? Why can't GDI+ be used within a service? http://msdn2.microsoft.com/en-us/library/system.drawing.aspx "Classes within the System.Drawing namespace are not supported for use within a Windows or ASP.NET service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time...
3
7443
by: sonu | last post by:
Hello all, I am trying to develop an application which will run as a windows service. The application should have Normal options available with service like start, stop and pause but along with this I need an option to show the windows application which my service has started as a result of its invokation. So I have written a service control by adding a new project of type
2
1032
by: bz | last post by:
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?
0
9656
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10819
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10526
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10570
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10240
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7772
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5641
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4000
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3100
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.