Send data to a service
-
i have project which contains a service application and window based application, When the window receive a message i need to pass some information regarding message ( a structure ) to the service. How to do that ? Thanks
I once did that using COM connection points, it was hard but very fast. A Windows Sockets loopback would probably have been easier, any form of IPC (InterProcess Communication) would do the trick but stay away from DDE (Devilish Data Exchange). Some people get on with memory mapped files and other don't. Rumours of COM runtime shared memory implementations persist despite the horror of such a thing and there are all sorts of off the shelf bits of middle ware and messaging frameworks gathering dust and waiting for someone to turn them into applications. :)
Nothing is exactly what it seems but everything with seems can be unpicked.
-
i have project which contains a service application and window based application, When the window receive a message i need to pass some information regarding message ( a structure ) to the service. How to do that ? Thanks
have a look at ControlService() API and make of user-defined control code. if not suitable, i think IPC is the option as mathew already said.
-
have a look at ControlService() API and make of user-defined control code. if not suitable, i think IPC is the option as mathew already said.
Rajkumar R wrote:
have a look at ControlService() API and make of user-defined control code.
It looks like that
ControlService
can only send code but can not take additional data with the code?! (Something likewParam
andlParam
stuff)Maxwell Chen
-
Rajkumar R wrote:
have a look at ControlService() API and make of user-defined control code.
It looks like that
ControlService
can only send code but can not take additional data with the code?! (Something likewParam
andlParam
stuff)Maxwell Chen
Maxwell Chen wrote:
It looks like that ControlService can only send code
yes.
Maxwell Chen wrote:
but can not take additional data with the code?! (Something like wParam and lParam stuff)
he doesnot want to pass the Window message as it
nitin3 wrote:
When the window receive a message i need to pass some information regarding message ( a structure ) to the service.
he want to pass some info regarding the message. if he can do it as unique code, much of work to implement IPC is avoided. otherwise IPC, that already i meantioned in my reply.