>>The two cases are differentiated by the fact that in case 4,
>>*lpNumberOfBytes == 0.
>>
>>Now - here's the rub - what's to prevent *lpNumberOfBytes being 0 in
>>case 3?  the docs say in case 3, the value in *lpNumberOfBytes is not
>>set by GetQueuedCompletionStatus().  So, it would retain whatever value
>>I set it to originally.  I'm thinking then that I need to set
>>*lpNumberOfBytes to a value, say 1, and then if it's different, I'll be
>>able to *know* it was set to 0.

Not true.  As per the documentation in condition 3 sets the number of bytes read.  If there is an error and 0 bytes have been read, it will be set to 0.
Setting a value of 1 would lead to problems for the same reason, what if 1 byte was read?  -1 could be an option

Really though, the difference between case 3 and 4 is that GetLastError() returns an error code in case 3, and it does not return an error code in case 4

_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users

Reply via email to