how to send a custom message to a window service?
-
Hello everyone: Please help me how to send a custom message to a window service? Thanks. -Freehawk
-
Hello everyone: Please help me how to send a custom message to a window service? Thanks. -Freehawk
I think you should first check if it is practically possible to create a hidden window from a service. Since the service normally is started before the user enters the system, I suppose it will be impossible to create the helper window on early stage. You should try to create the window after the user logs in. If you manage to create a helper hidden window from your service, then you can use the
WM_COPYDATA
message to send messages from your application to service. Otherwise, if you do not found a solution, I am afraid you have to use a thing called Inter-process Communication (IPC). There is a series of methods: sockets, shared memory, pipes and others, that you have to investigate. -
Hello everyone: Please help me how to send a custom message to a window service? Thanks. -Freehawk
sunyw_2006 wrote:
Please help me how to send a custom message to a window service?
Nishant Sivakumar
has written a nice article on Windows Service. Apart from that take a look atControlService
andSERVICE_USER_DEFINED_CONTROL
.
Nibu thomas A Developer Programming tips[^] My site[^]