Passing parameters to a windows service

G

Guest

Is it possible to pass a parameter to a "running" windows service on
background? I am developing a program such the in a random manner some
entries are being added to MSMQ Queues. The windows service application have
to work when an entry added to a queue. How can i invoke such a a service?
 
V

Vadym Stetsyak

Hello, basulasz!

b> Is it possible to pass a parameter to a "running" windows service on
b> background? I am developing a program such the in a random manner some
b> entries are being added to MSMQ Queues. The windows service application
b> have to work when an entry added to a queue. How can i invoke such a a
b> service?

Service has to get that value from queue, or do custom job, when entry is added to the queue?

If the latter you can consider any IPC mechanism ( sockets, named pipes, remoting, MMF, etc )
OTOH if you want that value hava a look at
( http://www.codeproject.com/csharp/mgpMyQueue.asp )
( http://www.csharphelp.com/archives3/archive581.html )

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
G

Guest

The service should be aware of received messages when a messege is sent to
the queue. And have to take the message as a parameter, and then it should
send sms message to a gsm number according to the parameter. Sending sms is
ok. But currently i check the queue with periodic intervals, and do my job
according to added messages.
 
V

Vadym Stetsyak

Hello, basulasz!

b> The service should be aware of received messages when a messege is sent to
b> the queue. And have to take the message as a parameter, and then it should
b> send sms message to a gsm number according to the parameter. Sending sms is
b> ok.

You can develop notification mechanism. if your message consumer and producer "live" on the same machine -
global sync mecanisms can be used ( named mutex, or system wide event ); if they work on
different machines then you can develop custom notification mechanism either using TCP, or
.NET Remoting.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top