The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by rpbrongers]

I just want to point out that the explanation of what happens when a delegate
is invoked after a RegisterWaitForSingleObject() is slightly wrong. In fact,
the .NET framework documentation is wrong. The second parameter in the
signature of the delegate (the boolean) should be called IsTimeOut, since it
is true when a timeout occurs, and false when the event was signaled. This is
exactly the opposite of what the book (and the .NET documentation) states. Bit
of a shame that the author didn't check it, it's so simple to do....Took me a
while to figure out why my code didn't do what I wanted, until I noticed the
NAME of the parameter in the .NET SDK documentation (not the text explaining
what happens, but the NAME of the parameter...see for yourself)

Regards,

Reinhard
import-bot (20211) [Avatar] Offline
#2
Re: RegisterWaitForSingleObject delegate error
[Originally posted by alan]

Thank you for bringing this to my attention. It will be corrected in the next
edition of this book. I verified that the parameter is indeed false when the
delegate is invoked as a result of becoming signaled.