Hi
How does one return a varible, value, or object from a window service
in .net?
How do I expose the service methods?
A link, code, or anything is wellcome, because I'm going bonkers!
/Erik TL 7 1240
You are going to have to be more specific.
A Windows Service is a process (.exe) that is run by the Service Control
Manager. You can not "return" a variable or object from a process
(whether it is a service, or a console application, or a winforms
application).
Where and what do you want to return the data to?
Erik TL wrote: Hi
How does one return a varible, value, or object from a window service in .net?
How do I expose the service methods?
A link, code, or anything is wellcome, because I'm going bonkers!
/Erik TL
Well, I have a windows service, that I want to do a Interface to. It
has runtimevalues (shedules in a sealed class), that I need to access.
So I want to return, preferably, an object (arrylist) to the interface.
If that's impossible, then perhaps a string value ...
I can understand the need to isolate the service process as such, but I
have diffuculties understanding the trouble of making disconnected GUI
to check runtime data...
/Erik TL
Remoting is one way to do this (I have used remoting for the exact same setup
as yours). Remoting is a way of doing inter-process calls in .net. Try
doing a search for remoting on MSDN to get started.
Regards, Jakob.
"Erik TL" wrote: Well, I have a windows service, that I want to do a Interface to. It has runtimevalues (shedules in a sealed class), that I need to access. So I want to return, preferably, an object (arrylist) to the interface. If that's impossible, then perhaps a string value ...
I can understand the need to isolate the service process as such, but I have diffuculties understanding the trouble of making disconnected GUI to check runtime data...
/Erik TL
Hi
I've done the return-string-chat mentioned in every example, but I'd
like to
know how i can expose an object from the service or, even better - a
method.
In essence I'd like to be able to return an arraylist from the service
and/or do a method call. If all else fails return a string from inside
the service to a client...
maybe I'm missing something here but I don't really understand
remotingobject (as compared to how you could use windows services
before).
How do i instatiate an object inside the service (as singleton) and use
it in both service and inteface?
/Erik
Hey Erik,
Remoting really does not have anything to do with Windows services but if
you want to call objects in your service process from another (UI) process
then remoting is the way to do it. Remoting is a bit like DCOM (in the "old"
days) only simpler. The remoting architecture supports singletons so it is
ideal for calling objects living within a service. It even lets you use
events so that the service can notify the UI of any changes (this is a bit
tricky though but it can be done).
Of course, there are other more simple ways of communicating between a
service and a corresponding user interface. E.g. you can let the service
create files in a well-known folder and then have the UI process read these
files (and the other way around) but you might run into synchronization
problems.
If you want I can try making a small sample project for you - in that case
just send me an e-mail.
Regards, Jakob.
"Erik TL" wrote: Hi
I've done the return-string-chat mentioned in every example, but I'd like to know how i can expose an object from the service or, even better - a method.
In essence I'd like to be able to return an arraylist from the service and/or do a method call. If all else fails return a string from inside the service to a client...
maybe I'm missing something here but I don't really understand remotingobject (as compared to how you could use windows services before).
How do i instatiate an object inside the service (as singleton) and use it in both service and inteface?
/Erik
Hi,
Sen you a mail, I hope you got it...and once again thanks for the offer
- I accept it humbly.
Kind Regards
/Erik TL
Hi Erik,
I got you e-mail and I have put together a small sample for you. I hope it
will get you started :-)
Regards, Jakob.
"Erik TL" wrote: Hi,
Sen you a mail, I hope you got it...and once again thanks for the offer - I accept it humbly.
Kind Regards /Erik TL
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Andrew Poulos |
last post by:
If I manage to call the following bit of javascript in IE and MZ
w = window.open("", "s", 'status=no,resizable=no,width=450,height=450');
I get a window that is not resizable and without a...
|
by: PatrickSA |
last post by:
Hi,
Am new to web services, so apologies for the basic nature of the question -
and apologies in advance if this is the wrong newsgroup. We're building a
new web service and I'm looking around...
|
by: Julia |
last post by:
My service send email messages and log all information to a log file
I wonder if it's common to raise events from the service(the remote object
which hosted inside the service)
to my MMC snapin,...
|
by: Erik TL |
last post by:
Hi
How does one return a varible, value, or object from a window service
in .net?
How do I expose the service methods?
A link, code, or anything is wellcome, because I'm going bonkers!
...
|
by: WinDev |
last post by:
We are trying to build a system where we have a Windows Service do some
manipulation of data, and then sending the data to a Windows App. I had
posted a question of how we should do this and was...
| |
by: dotNeter |
last post by:
The services, talked here, are things used in IServiceContainer,
IServiceProvider, etc.
In my opinion, everything can be a service, and a service is generally
used for providing specific features...
|
by: wolfenstein |
last post by:
Hi,
I'm working on a window service and i want to give an interface to it. What can be the best approach to get this done.
Can i include a Form, when the user starts the service then gives some...
|
by: =?Utf-8?B?am9obmY=?= |
last post by:
Trying to get a see windows messages using IMessageFilter interface however
it does not seem to get all window messages. Specifically I am looking for
the WM_POWERBROADCAST. I override wndproc...
|
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,...
|
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: 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...
| |
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |