473,394 Members | 1,693 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,394 software developers and data experts.

Interacting with Windows Service (but more than just status)

I need to create a Windows Service, which will be hosting a couple of worker
classes, each in there own thread. I will be creating a tray Icon (Notify
Icon) and a windows form to manage this service.

I can send custom commands to start or stop or... any of the worker objects
that the windows service will be hosting.

What I need to do is to get some information back to the Tray Icon app or
the windows form about the actual worker items status inside the windows
service. Is there some way to get the windows service to raise events or pass
information back about its inner workings?

I just found:
public override System.Runtime.Remoting.ObjRef CreateObjRef(Type
requestedType)
{
return base.CreateObjRef(requestedType);
}
but I have no idea if I'm actually barking up the wrong tree.

Short of getting the windows service to write it's status to a text file,
which I can then read from the windows app (Obviously a bad idea and actually
meant as a joke ;-) I can't think of another way to do this.

If anyone has any ideas/suggestions, it would be much appreciated.

Thanks
David
Mar 14 '07 #1
1 2066
Why dont you just communicate through socket calls to and from the service
and the client.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"W1ld0ne74" <W1*******@hotmail.comwrote in message
news:2B**********************************@microsof t.com...
>I need to create a Windows Service, which will be hosting a couple of
worker
classes, each in there own thread. I will be creating a tray Icon (Notify
Icon) and a windows form to manage this service.

I can send custom commands to start or stop or... any of the worker
objects
that the windows service will be hosting.

What I need to do is to get some information back to the Tray Icon app or
the windows form about the actual worker items status inside the windows
service. Is there some way to get the windows service to raise events or
pass
information back about its inner workings?

I just found:
public override System.Runtime.Remoting.ObjRef CreateObjRef(Type
requestedType)
{
return base.CreateObjRef(requestedType);
}
but I have no idea if I'm actually barking up the wrong tree.

Short of getting the windows service to write it's status to a text file,
which I can then read from the windows app (Obviously a bad idea and
actually
meant as a joke ;-) I can't think of another way to do this.

If anyone has any ideas/suggestions, it would be much appreciated.

Thanks
David

Mar 14 '07 #2

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

Similar topics

7
by: Mike | last post by:
I want to create a windows service that will monitor another window service. what i need for the service to do is, if a service is stopped I need it to start the service back up example: ...
0
by: Mr Bounce | last post by:
Hi, Probably well worn ground, this, but im stumped and need some help, if you could: I'm trying to write some code for a windows service that needs to run in the background polling a server...
3
by: Nathan Kovac | last post by:
I have a feeling I am missing something simple, but I just can't find it. Perhaps someone can give me a lead on where to look. I will describe the issue then post my code to the web service. My...
4
by: Kris | last post by:
I have a Windows Service in C# talking to a serial port and using Remoting. It also uses several COM objects. On customer's computer the service will occassionally hang somewhere - the service...
0
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. The program I'm trying to develop needs to be able to do the following: - Select remote server -...
1
by: SQLScott | last post by:
In searching this site, i have seen plenty of posts and answers detailing how to check the status of a service. Many services, however, will "hang". Their status says that are running, but in...
4
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
3
by: Sylvie | last post by:
My Windows Application has two forms, one form contains a grid (lets say Stock Listing), and the other is a form of one stock, contains some edit boxes for one stock's fields.. Is it possible to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
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...

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.