*Experts* Merrion Posted November 19, 2002 *Experts* Posted November 19, 2002 The function ThreadPool.RegisterWaitForSingleObject takes parameters WaitHandle, WaitOrTimerCallback, Object, Integer, Boolean WaitHandle is the handle to be waited on, WaitOrTimerCallback is a delegate sub, Integer is the timeout in millisecond (or -1 for infinite) Boolean is whether this is only fired once But what goes in Object ? Thanks in advance, Baffled of Ballsbridge Quote Printer Monitor for .NET? - see Merrion Computing Ltd for details
*Experts* Merrion Posted November 19, 2002 Author *Experts* Posted November 19, 2002 *Resolved* ThreadPool.RegisterWaitForSingleObject - what to pass as Object? Never mind - it's there so you can pass anything you need to the callback procedure *sigh - so much to learn!* Quote Printer Monitor for .NET? - see Merrion Computing Ltd for details
*Gurus* Derek Stone Posted November 19, 2002 *Gurus* Posted November 19, 2002 Thank God it's there. Back in VB6 you only got a 32-bit parameter to work with, and had to use it as a pointer if you wanted to pass more than a long integer. Then in the callback you had to allocate memory and set it to the passed pointer. Sure, it wasn't exactly hard to do, but this saves us the trouble. Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.