Windows服务恢复不重新启动服务

我配置Windows服务的恢复,重新启动,失败后延迟一分钟。但是我从来没有得到它实际上重新启动服务(即使是最明显的错误)。

我在EventViewer中收到一条消息:

The description for Event ID ( 1 ) in Source ( MyApp.exe ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Access violation at address 00429874 in module ‘MyApp.exe’. Write of address 00456704.

还有什么我要做的吗?在我的代码(我使用Delphi)中有什么需要设置来启用此功能吗?

服务恢复旨在处理服务崩溃的情况 – 因此,如果您访问taskmgr并右键单击服务进程中的“结束进程”,则恢复逻辑应该启动。我不认为服务恢复逻辑启动如果您的服务正常退出(即使退出并出现错误)。

此外,eventvwr消息指示您的应用程序称为ReportEvent API,指定事件ID 1.但是您尚未使用事件查看器注册事件消息,因此它不能将事件ID 1转换为有意义的文本字符串。

相关文章

Windows2012R2备用域控搭建 前置操作 域控主域控的主dns:自...
主域控角色迁移和夺取(转载) 转载自:http://yupeizhi.blo...
Windows2012R2 NTP时间同步 Windows2012R2里没有了internet时...
Windows注册表操作基础代码 Windows下对注册表进行操作使用的...
黑客常用WinAPI函数整理之前的博客写了很多关于Windows编程的...
一个简单的Windows Socket可复用框架说起网络编程,无非是建...