473,503 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Window service interface

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

Jul 21 '05 #1
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

Jul 21 '05 #2
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

Jul 21 '05 #3
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

Jul 21 '05 #4
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

Jul 21 '05 #5
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

Jul 21 '05 #6
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

Jul 21 '05 #7
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

Jul 21 '05 #8

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

Similar topics

18
2472
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...
2
528
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...
1
1445
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,...
7
964
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! ...
4
3977
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...
6
1897
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...
1
878
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...
4
3742
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...
0
7202
marktang
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,...
0
7462
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...
1
5014
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...
0
4673
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...
0
3167
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...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
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 ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
382
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...

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.