@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The CoWaitForMultipleHandles API !!!!C# Signature: [DllImport("ole32.dll")] static extern int CoWaitForMultipleHandles(uint dwFlags, uint dwTimeout, uint cHandles, IntPtr [] pHandles, out uint lpdwindex); !!!!User-Defined Types: None. !!!!Notes: None. !!!!Tips & Tricks: This should be called as part of a long running process in Excel VSTO add-ins, for example. !!!!Sample Code: System.Threading.ManualResetEvent event = new System.Threading.ManualResetEvent(false); System.IntPtr[] waitHandles = { event.SafeWaitHandle.DangerousGetHandle() }; uint lpdwindex; while(/* Put condition here! */) { // Lots of work!!! CoWaitForMultipleHandles(0, 0, (uint)waitHandles.Length, waitHandles, out lpdwindex); } !!!!Alternative Managed API: Do you know one? Please contribute it! Documentation: CoWaitForMultipleHandles@msdn on MSDN
Edit ole32.CoWaitForMu...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.