Send windows message to a Windows Service

前端 未结 7 1893
隐瞒了意图╮
隐瞒了意图╮ 2021-02-06 05:57

Is there any tool to send (mimic) a windows message like \'WM_ENDSESSION\' to a windows service?

OR

How can I send a windows message to a process using C#?

相关标签:
7条回答
  • 2021-02-06 06:41

    Services should be controlled using ServiceController class

    Represents a Windows service and allows you to connect to a running or stopped service, manipulate it, or get information about it.

    You can use it to start, stop and communicate with services using this class.

    0 讨论(0)
提交回复
热议问题