【发布时间】:2018-07-01 00:05:04
【问题描述】:
为了调试 Windows 服务,这里写在我公司,main 函数以:
Sleep(3000); // three seconds
这应该允许我在服务启动时执行“附加到进程”,但我似乎太慢了,所以我决定将此值修改为 30,000(30 秒)。
但是现在,在启动服务时,我收到以下错误消息:
Prompt>net start <Service_Application>
The service is not responding to the control function.
为了不陷入这种超时,我可以放在那里的最大值是多少?
【问题讨论】:
-
不愉快的猜测,30 秒是服务管理器用来生成此错误的超时时间。考虑 29 秒。
标签: c++ windows service timeout