HighTechTalks DotNet Forums  

Send a custom command from a console application to a windows service

Dotnet Framework (Component Services) microsoft.public.dotnet.framework.component_services


Discuss Send a custom command from a console application to a windows service in the Dotnet Framework (Component Services) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Send a custom command from a console application to a windows service - 04-26-2004 , 07:39 AM






Hi!

Is it possible to send a custom command from a .NET console
application to my windows service?

Thanks,
Stefan

Reply With Quote
  #2  
Old   
Steve
 
Posts: n/a

Default RE: Send a custom command from a console application to a windows service - 05-04-2005 , 11:22 PM






Take a look at ServiceController.ExecuteCommand. You use this in the client. To catch the command you must override ServiceBase.OnCustomCommand in your service.

It's rather limited. You can pass in an integer from 128 to 256 and nothing is returned. For true two-way communication you will need a transport layer as Klaus suggests.


From http://www.developmentnow.com/g/19_2...ws-service.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.