473,795 Members | 2,861 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3517
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.co m

"Mike" <mj*@matsi.co m> wrote in message
news:f2******** *************** *@posting.googl e.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
23882
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 converted the mdb to version 2002 under MS Access XP Polish and under this version everything works OK. The problem starts when I copy the mdb file to Windows XP EN and start it with MS Access XP EN. I get following error: "The expression On...
0
1117
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 increased functionality. I've written the service and the controller app, and I can start/stop the service, etc. with no problems.
9
7273
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 stopping. Please advise how to stop the service. Thanks, SP
4
11207
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. What I would like to do is make the serial port accessible via a web service. The web service and the legacy application would be running on the same machine. The mobile application would access the web service via a network connection. It...
1
1515
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 my win form... is it possible? regards.
4
4185
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.
1
3884
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 that I work for develops software that monitors Customer Service Representative (CSR) performance. When you call a help desk and hear "This call may be monitored for quality purposes", the software that does this monitoring very likely has been...
7
2282
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 shows messages from the service. Can I do that with remoting? What are the main steps to do that? --
4
6653
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 proxy server which was blocking access to database server because the proxy server only allowed web requests. Now i have decided to build a Web Service to send data from my online server to Vb.NET application, I am using PHP at the other end to...
0
9673
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, 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...
0
10443
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, 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...
0
10216
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 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...
1
10165
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,...
0
10002
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 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...
1
7543
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6783
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
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...
0
5565
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.