>From the help to RegisterWaitForSingleObject:

"The wait thread uses the Win32 WaitForMultipleObjects function to monitor
registered wait operations. Therefore, if you must use the same native
operating system handle in multiple calls to RegisterWaitForSingleObject,
you must duplicate the handle using the Win32 DuplicateHandle function."

I need to register several callbacks for the same wait handle, so as
described I'll duplicate it with P/Invoke to DuplicateHandle().

However, the RegisterWaitForSingleObject() method requires an instance of
the WaitHandle class as argument. How do I come from the IntPtr that is
returned by DuplicateHandle() to a WaitHandle instance?

For some odd reason the WaitHandle class is abstract, so I also need to
figure out what actual class I must instantiate.

regards
Henrik

Reply via email to