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

Communicating with a Windows Service from a Windows Application

I have written a windows service that has a few methods which have a
return type of dataset. I also have an application that I have
written which I would like to 'hook' into my service and use the
dataset functions I have developed. My service and application are two
seperate projects under the same solution. My problem comes in when
I try to 'hook' into the service and call anything from it.

I have tried using the ExecuteCommand method in ServiceProcess but it
has a return type of void and only allows me to pass a numeric
parameter. I can get past the numeric paramter part but I need to be
able to return a dataset from the service to my application.

Bottom line... I would like to have a service that allows me to
consume the data it holds instead of hitting the datasource that the
data originally was pulled from by the service. (One way in, one way
out)

Any information, or ideas, on how to handle this process would be
greatly appreciated.

Thanks for your help.

(If you need more detail, please let me know.)
Nov 16 '05 #1
1 3497
Mike,

Basically, in order to do this, you will have to have your service
expose an object through remoting. Then, you can get a proxy to the object
in the service process and execute methods in that process.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mike" <mj*@matsi.com> wrote in message
news:f2************************@posting.google.com ...
I have written a windows service that has a few methods which have a
return type of dataset. I also have an application that I have
written which I would like to 'hook' into my service and use the
dataset functions I have developed. My service and application are two
seperate projects under the same solution. My problem comes in when
I try to 'hook' into the service and call anything from it.

I have tried using the ExecuteCommand method in ServiceProcess but it
has a return type of void and only allows me to pass a numeric
parameter. I can get past the numeric paramter part but I need to be
able to return a dataset from the service to my application.

Bottom line... I would like to have a service that allows me to
consume the data it holds instead of hitting the datasource that the
data originally was pulled from by the service. (One way in, one way
out)

Any information, or ideas, on how to handle this process would be
greatly appreciated.

Thanks for your help.

(If you need more detail, please let me know.)

Nov 16 '05 #2

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

Similar topics

3
by: Stan | last post by:
Hallo, I have developed an application in MS Access 2000 (Polish version) under MS Windows XP prof (also Polish). Now I would like to run this code on MS Windows XP EN and MS Access XP EN. I have...
0
by: Jason McLean | last post by:
Hi, I have an app I wrote in VB a while back that I kludged into running as a service with srvany. I'm now re-writing this app in C# to make it a genuine service that's more stable and has...
9
by: SP | last post by:
Hi All, I wrote a windows service which is supposed to stop after specified amount of time. I am calling OnStop() after specified time. OnStop() methods executed but I dont see the service...
4
by: joe bloggs | last post by:
I am writing a mobile application to interface with a legacy system and I am planning to use web services to communicate with this system. The legacy system receives data through a serial port. ...
1
by: Gianmaria | last post by:
Hi, i've wrote a windows service that handle incoming tcp connections. Now i need to let him communicate with a windows form.. but without remoting. My service fires events too that i subscribe 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...
1
by: Tom Yee | last post by:
I would like to write a Windows Service that can communicate with any open browser windows that an interactive user may be running. The service itself does not need to have a UI. The company...
7
by: Diego F. | last post by:
Hello. I have a windows service running that listens to a port and makes insert queries in a database. I need to make an interface, so my idea is creating a simple windows application that just...
4
rizwan6feb
by: rizwan6feb | last post by:
I am working on an application in Vb.NET the pulls data from an online MySQL server. The problem i was facing was that my application had no direct access to internet. The application connects to a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
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
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...
0
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,...
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...
0
agi2029
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,...

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.