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

Send Message to Windows Service

Hi!

I want to develop two applications one a Windows Service and the other a GUI
based application. I want some sort of communication between Service and
GUI. I have decided to use Remoting for this purpose.

For this I registered an object on Service side for Remoting purposes.
Remote Object exposes a function named ReloadFiles() that should internally
send a message to service class to Reload some files. Now I don't know how
to send message to that service class because Remote Object doesn't have a
reference to service.

Anybody there to give me a helping hand.
Thanks in advance.

Ahmad Jalil Qarshi
Jan 2 '06 #1
7 13943
"Ahmad Jalil Qarshi" <ah*********@SPAMhotmail.com> wrote in message
news:eu*************@TK2MSFTNGP09.phx.gbl...
Hi!

I want to develop two applications one a Windows Service and the other a
GUI based application. I want some sort of communication between Service
and GUI. I have decided to use Remoting for this purpose.

For this I registered an object on Service side for Remoting purposes.
Remote Object exposes a function named ReloadFiles() that should
internally send a message to service class to Reload some files. Now I
don't know how to send message to that service class because Remote Object
doesn't have a reference to service.

Anybody there to give me a helping hand.
Thanks in advance.

Ahmad Jalil Qarshi


They need to share some concept of type information to be able to pass the
message.

Make the remoted object implement and interface, and have that interface
declared in a separate DLL.

Now make the UI reference the DLL and it can use (assming the interface is
called IFoo)

IFoo f = (IFoo)RemotingServices.Connect(typeof(IFoo), myUrl);

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
Jan 2 '06 #2
Hi,

This will work with remoting, but i think it is little uncouthly...

Did you thinked about Interprocess communication or shared memory or shared
events .. ?
See: http://www.habjansoftware.com/ipc_library.aspx

Regards,
Josip Habjan

"Ahmad Jalil Qarshi" <ah*********@SPAMhotmail.com> wrote in message
news:eu*************@TK2MSFTNGP09.phx.gbl...
Hi!

I want to develop two applications one a Windows Service and the other a
GUI based application. I want some sort of communication between Service
and GUI. I have decided to use Remoting for this purpose.

For this I registered an object on Service side for Remoting purposes.
Remote Object exposes a function named ReloadFiles() that should
internally send a message to service class to Reload some files. Now I
don't know how to send message to that service class because Remote Object
doesn't have a reference to service.

Anybody there to give me a helping hand.
Thanks in advance.

Ahmad Jalil Qarshi

Jan 2 '06 #3
"Josip Habjan" <jh*****@SPAM-OFF.net.hr> wrote in message
news:dp**********@ss405.t-com.hr...
Hi,

This will work with remoting, but i think it is little uncouthly...

Did you thinked about Interprocess communication or shared memory or
shared events .. ?
See: http://www.habjansoftware.com/ipc_library.aspx

Regards,
Josip Habjan

"Ahmad Jalil Qarshi" <ah*********@SPAMhotmail.com> wrote in message
news:eu*************@TK2MSFTNGP09.phx.gbl...
Hi!

I want to develop two applications one a Windows Service and the other a
GUI based application. I want some sort of communication between Service
and GUI. I have decided to use Remoting for this purpose.

For this I registered an object on Service side for Remoting purposes.
Remote Object exposes a function named ReloadFiles() that should
internally send a message to service class to Reload some files. Now I
don't know how to send message to that service class because Remote
Object doesn't have a reference to service.

Anybody there to give me a helping hand.
Thanks in advance.

Ahmad Jalil Qarshi



Of course the .NET 2.0 remoting IPC channel uses named pipes

Regards

Richard Blewett - Developmentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
Jan 2 '06 #4
"Richard Blewett [DevelopMentor]" <richard at nospam dotnetconsult dot co
dot uk> wrote in message news:u9**************@tk2msftngp13.phx.gbl...

Of course the .NET 2.0 remoting IPC channel uses named pipes

Regards

Richard Blewett - Developmentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Yes, it is true, but in framework 1.1 you dont have IPC channels or named
pipes....

Regards,
Josip Habjan
Jan 2 '06 #5
"Josip Habjan" <jh*****@spamoff-net.hr> wrote in message
news:dp**********@magcargo.vodatel.hr...
"Richard Blewett [DevelopMentor]" <richard at nospam dotnetconsult dot co
dot uk> wrote in message news:u9**************@tk2msftngp13.phx.gbl...

Of course the .NET 2.0 remoting IPC channel uses named pipes

Regards

Richard Blewett - Developmentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Yes, it is true, but in framework 1.1 you dont have IPC channels or named
pipes....

Regards,
Josip Habjan


Agreed,

but I just thought it was worth pointing out that if he was using v2.0 there
was a solution built into the framework without him having to buy your
component

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
Jan 3 '06 #6
"Richard Blewett [DevelopMentor]" <richard at nospam dotnetconsult dot co
dot uk> wrote in message news:eW**************@TK2MSFTNGP14.phx.gbl...

Agreed,

but I just thought it was worth pointing out that if he was using v2.0
there was a solution built into the framework without him having to buy
your component

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk


No problem :o)

Regards,
Josip Habjan
Jan 3 '06 #7
Thanks Josip & Richard

Since I have .NET 1.1 so I would like to use option provided by Richard
Blewett.

Thanks again.

Ahmad Jalil Qarshi

"Josip Habjan" <jh*****@SPAM-OFF.net.hr> wrote in message
news:dp**********@ss405.t-com.hr...
"Richard Blewett [DevelopMentor]" <richard at nospam dotnetconsult dot co
dot uk> wrote in message news:eW**************@TK2MSFTNGP14.phx.gbl...

Agreed,

but I just thought it was worth pointing out that if he was using v2.0
there was a solution built into the framework without him having to buy
your component

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk


No problem :o)

Regards,
Josip Habjan

Jan 3 '06 #8

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

Similar topics

4
by: CK | last post by:
Hi all, I know this question is stupid. But i need some advice for this. I am trying to develop a website, which will allow the user send to order form to the admin email. I am planning to use the...
4
by: Kurien Baker Fenn | last post by:
How to send data from an ASP form to a visual basic form? Please help
2
by: robboll | last post by:
On a Windows 2000 Server in MYDomain I can do the following successfully: Net Send JoeUser "test" However on a Windows Server 2003 (Standard Edition) in MyDomain I get: An error occurred...
1
by: Paul | last post by:
I am using a windows service which accesses Microsoft Outlook. Outlook is supposed to send an email. This works fine when not run in a windows service. I am running the service under my user...
6
by: Usman | last post by:
Hi I have a window service written in C#. I have another application that requires a lengthy process to be performed like taking backup. How can I make this lengthy process be performed by...
1
by: mmassari | last post by:
Hi, I need to send a mail message from a web service. If i execute the code from a Windows Form Application the message is sended correctly but if i execute the same code from a web service an...
3
by: Gerard | last post by:
Hello I have created a windows service to monitor a database, it starts some checks when a timer elapses. The checks send emails depending on their findings. My issue is that when I created a...
5
by: tommaso.gastaldi | last post by:
Hi. I have been implementing a simple email notification system using the handy class SmtpClient: With SmtpClient .Host =MailServer .Send(MailMessage) '... now my client is asking also for...
1
by: Vijay | last post by:
Hi, I have a problem to send Mail in ASP. I am using CDO for sending mail. My Server configuration are : Windows Server 2003 Stadndard Edition with R2, Service Pack 2, Microsoft Management...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...

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.