Windows XP waithHandle class

Joined
Apr 15, 2010
Messages
1
Reaction score
0
I have a problem in managed C++ code.

I have an ArgumentNullException in:
result = System::Threading::WaitHandle::WaitAny(waitHandles);

I have defined waitHandles:
AutoResetEvent ^onNewImageEvent = gcnew AutoResetEvent(false);
AutoResetEvent ^onStopLiveEvent = gcnew AutoResetEvent(false);
array<WaitHandle^> ^waitHandles=gcnew array<WaitHandle^>{onStopLiveEvent,onNewImageEvent};

What coul be the problem? Is it in the definition of waitHandles?

Thanks in advances.
 
Back
Top