带有命名事件和 CNT_TIME 的 CeSetUserNotificationEx 在 services.exe 下失败
我有一个服务应用程序,一个在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论