[Win32utils-devel] Some more win32-changenotify analysis
djberg96 at gmail.com
Thu Aug 9 07:20:11 EDT 2007
On 8/9/07, Heesob Park <phasis at gmail.com> wrote:
> 2007/8/9, Daniel Berger <djberg96 at gmail.com>:
> > On 8/8/07, Heesob Park <phasis at gmail.com> wrote:
> > <snip>
> > > Don't give up yet :)
> > >
> > > I googled and found a Delphi version.
> > > I ported it into Ruby and in my test, it can catch all events.
> > >
> > > It requires CreateIoCompletionPort and GetQueuedCompletionStatus API
> > > function.
> > > I also found a bug releated with aquiring next offset of fni at
> > > get_file_action.
> > >
> > > Here is another version of wait and get_file_action:
> > <snip>
> > I tried this on my Windows XP (Home) SP2 laptop at home but it didn't
> > pick up any events when I ran the threaded file generator with an
> > infinite wait period. When I specified a wait time of 10 seconds, it
> > seemed to pick up one event every 10 seconds, but with the file name
> > chopped off.
> > I'll try it on my XP Pro box tomorrow at work and see what happens.
> In my test with XP Home SP2 , it works fine.
> Do you modified both wait and get_file_aciton with my version?
Yes, though your version does do a much better job at picking up
multiple file events that aren't threaded in my limited testing. For
example, opening and saving a file via gvim now picks up four separate
events (tempfile generation, deletion, etc).
It just seems to be the threaded file creation it doesn't pick up. I'm
not sure why, but I'll try at work and see if I see the same behavior
on XP Pro.
> > Is there a way to do a FileIOCompletionRoutine via Win32API btw?
> FileIOCompletionRoutine is application defined callback function.
> As far as I know Win32API don't support callback function.
Any way we could add it? I know the core team won't take patches, but
I can always release something separately.
PS - I uploaded Windows::NIO into CVS (in the windows-pr project),
that contains the functions we need for this. I think I'll put out
windows-pr 0.7.0 today.
More information about the win32utils-devel