Re: ReadDirectoryChangesW seem to looses events?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Phil Ten (pt_at_dafweb.com)
Date: 07/19/04


Date: Mon, 19 Jul 2004 11:06:43 +0100

Thank you for your post.

Well, I am not not sure why, but I couldn't reproduce the symptom
I mentioned. I did remove my "SleepEx" call and it did not make
any difference this time. I am puzzled.

I return to my main problem which is events apprently lost,
thanks to your post, I have more information.

When I compare the value returned by "lpNumberOfBytes"
and the address reached when looping through the records buffer,
using "NextEntryOffset" in "FILE_NOTIFY_INFORMATION",
it does not match. NextEntryOffset=0 before the last record.

For example, with my last try, I have:

lpNumberOfBytes=2496, and NextEntryOffset=0 in the FIRST record. Which
reffering to
the documentation means: (I quote) "A value of zero indicates that this is
the last record."

However, if I ignore this zero value, and loop in the records list by step
of 64
until "lpNumberOfBytes" is reached, so far, it seem to work and I get all
expected
events????

Any help would be very appreciated

Phil Ten.

"Rhett Gong [MSFT]" <v-raygon@online.microsoft.com> wrote in message
news:XaZ8AZVbEHA.3748@cpmsftngxa06.phx.gbl...
> Hi Phil,
> Could you let me know what you get in lpNumberOfBytes value returned by
> GetQueuedCompletionStatus when you can not exit from your do loop?
>
> 1>If it returns 0 in lpNumberOfBytes, I suggest you increasing the buffer
size, and let
> me know what you get then.
> 2>If not and increasing buffer could not resolve your problem, please send
me a simple
> repro sample.
>
>
> Thanks,
> Rhett Gong [MSFT]
> Microsoft Online Partner Support
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Please reply to newsgroups only. Thanks.
>
> PS. To semd me email, please remove online from my email address.
>