Passing event notification from driver to application again

Hello everybody,

I was sending 64 events handles to the driver from application. The events
were referenced successfully in the driver. To notify the application for
each incoming packet, I used a circular buffer to hold the events, when ever
a packet comes in, the driver clears and set a event, the counter will do a
mod 64 increment.

On the application side, I was using

WaitForMultipleObjectsEx(MAX_READS, hEvents, FALSE, INFINITE, FALSE)

here MAX_READS is 64, hEvents is HANDLE hEvents[64].

Seems I got substantially more notifications than the actual ones. (maybe 64
times). I don’t understand why, can anyone give me some hints?

Thanks a lot!
Yuanhui