there are many examples about ReadDirectoyChangesW on Web, but they all have a small bug:
bytesReturned may be zero when ReadDirectoyChangesW()/GetOverlappedResult() return TRUE, in this case,
you will encounter an access violation if read buffer without checking bytesReturned
a simple way to reproduce this bug:
1. host A share a folder, namelly \\hosta\sharefolder
2. host B map \\hosta\sharefolder to Z:, and start a monitor on Z:
3. host A rename/delete sharefolder brutely, then ReadDirectoyChangesW()/GetOverlappedResult() will return TRUE with zero bytesReturned