带有命名事件和 CNT_TIME 的 CeSetUserNotificationEx 在 services.exe 下失败

发布于 2024-09-01 07:40:25 字数 361 浏览 1 评论 0原文

我有一个服务应用程序,一个在 services.exe 下运行的简单 dll。我可以将 VS 调试器附加到 services.exe,激活服务应用程序 dll,然后在调试器中单步执行它,没有任何问题。

现在,我尝试使用 CeSetUserNotificationEx 在未来的某个时间收到通知。我使用 CNT_TIME 触发器类型和命名事件命名方案。在 services.exe 下执行此操作时,通知子系统在时间发生时永远不会发出信号。

如果我在一个单独的 exe 下运行 dll,该 exe 仅加载 xxx_Init 函数(和其他 xxx_...)并调用它,那么完全相同的代码将在时间发生时生成有信号事件。

为什么它在 services.exe 下不起作用?

I have a service application, a simple dll running under services.exe. I can attach the VS debugger to services.exe, activate the service application dll and then single step it in the debugger without any problem.

Now, I try to use CeSetUserNotificationEx to be notified at a certain time in the future. I use the CNT_TIME trigger type with the named event naming scheme. When doing this under services.exe, the event is never signaled by the notification subsystem when the time occurs.

If I run the dll under a separate exe that just loads the xxx_Init function (and other xxx_...) and calls it, then the exact same code will generate a signaled event when the time occurs.

Why doesn't it work under services.exe?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文