是否有任何工具可以将“WM_ENDSESSION”之类的 Windows 消息发送(模仿)到 Windows 服务?
或
如何使用 C# 向进程发送 Windows 消息?
(我只会C#)
编辑:目的:基本上我必须调试一个 Windows 服务来修复仅在系统关闭时发生的错误。
最佳答案
应使用 ServiceController class 控制服务
Represents a Windows service and allows you to connect to a running or stopped service, manipulate it, or get information about it.
您可以使用它来启动、停止使用此类的服务并与之通信。
关于c# - 向 Windows 服务发送 Windows 消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1233195/