Receive Windows Messages in a Service

前端 未结 2 351
你的背包
你的背包 2021-01-19 08:07

I have written a service in VC++. I followed the tutorial here. Now, I am trying to find out how to receive messages like DBT_DEVICEARRIVAL, DBT_DEVICEREMOVECOMPLETE, WM_COP

2条回答
  •  醉话见心
    2021-01-19 08:39

    Use RegisterServiceCtrlHandlerEx function with HandlerEx callback function.

    Yes, as pointed by 0xC0000022L is better use IPC technique, for example named pipes - my favourite. :)

提交回复
热议问题