WaitForMultipleObjects未捕获事件 [英] Event not captured by WaitForMultipleObjects

查看:99
本文介绍了WaitForMultipleObjects未捕获事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个程序。两者都打开一个命名事件,说"START_EVENT"。 Process1使用
SetEvent 调用触发事件。 Process2使用 WaitForMultipleObjects 调用来捕获偶数。使用
WaitForMultipleObjects 调用,因为还有其他要捕获的事件。但由于某种原因,Process2没有捕获START_EVENT!


使用此调用CreateEvent(NULL,FALSE,FALSE," START_EVENT")创建事件。


Process2使用WaitForMultipleObjects(4,Events,FALSE,INFINITE)调用捕获事件。这里的Events是一个HANDLE数组。


当事件被触发时,WaitForMultipleObjects调用只是等待而不会失败。有人请告诉我WaitForMultipleObjects调用不能捕获事件的原因。


提前致谢。




Natarajan RJ

解决方案

您好Natarajan RJ,


我正在将您的主题转移到 Visual C ++ 论坛
致力于支持。感谢您的理解。


最好的问候,


杰克


I have two processes. Both open a named event say "START_EVENT". Process1 triggers the event using SetEvent call. Process2 uses WaitForMultipleObjects call to capture the even. WaitForMultipleObjects call is used because there are other events to capture. But for some reason Process2 doesn't capture the START_EVENT!

The events are created using this call, CreateEvent(NULL, FALSE, FALSE, "START_EVENT").

Process2 uses WaitForMultipleObjects(4, Events, FALSE, INFINITE) call to capture the event. Here Events is an array of HANDLE.

When the event is triggered, the WaitForMultipleObjects call just wait and doesn't fail. Somebody please tell what might be the reason for WaitForMultipleObjects call not to capture the event.

Thanks in advance.


Natarajan RJ

解决方案

Hi Natarajan RJ,

I am moving your thread into the Visual C++Forum for dedicated support. Thanks for your understanding.

Best Regards,

Jack


这篇关于WaitForMultipleObjects未捕获事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆