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(Ty pe
requestedType)
{
return base.CreateObjR ef(requestedTyp e);
}
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 1 2093
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*******@hotm ail.comwrote in message
news:2B******** *************** ***********@mic rosoft.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(Ty pe
requestedType)
{
return base.CreateObjR ef(requestedTyp e);
}
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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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:
service 1 - my service watches service 2 - windows service
service 2 is stopped - service 1 starts service 2
|
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 for commands. Certain commands
require the service to interact with the application running on the
active desktop, currently just to either shut it down or start it.
|
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 issue is simply getting
timers to work. I have a DatabaseManager.DataManagerFacade which contains a
timer. Every 6 seconds it updates stock data using an online webservice. I
wrote have 2 possible startup projects to make the service work. One...
|
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 still shows on a Task Manager
list. In Services it says it is still running. However there is no way to
stop it other than by rebooting the whole computer. No exception (including
non-CLS) is ever generated. I added a separate System.Timers.Timer...
|
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
- Select from two specific services
- Check the status of the server
| |
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 reality the service is non-responsive.
In light of this, I am using the ExecuteCommand method of the specified
servicecontroller to "ping" teh service. In that method I pass it a command
(an arbitrary number higher than 245). My understanding...
|
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 check to see if the status is in stopped
or running mode. But that doesn't tell me if it is actually running.
I need to know this so that if it happens I can programmatically start the
same service on another machine.
|
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 run application remotely and retrieve grid and form data
in some way without accessing directly to database server?
Web Services is being used for this purpose I think,
Which methods must be used for this ?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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,...
|
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...
| |
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...
|
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,...
|
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...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |