This question shows research effort; it is useful and clear
0
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
我有一个本地系统服务应用程序,用 C++/MFC 编写,旨在在 Windows 操作系统上运行。系统刚启动时,我需要在此服务中运行代码。我最初的想法是从 ServiceMain() 替代函数的开头运行它,该函数由对 StartServiceCtrlDispatcher() API 的调用定义,但问题是如果我停止然后重新启动该服务,它也会运行。