ReadDirectoryChangesW?
Zz
Zz at nospam.com
Mon Aug 25 08:02:54 PDT 2008
Denis Koroskin Wrote:
> On Fri, 22 Aug 2008 20:07:09 +0400, Zz <Zz at nospam.com> wrote:
>
> > davidl Wrote:
> >
> >> åŨ Fri, 22 Aug 2008 21:10:12 +0800ï¼ÅZz <Zz at qqq.c> Ã¥â â¢Ã©ï¿½â:
> >>
> >> > Has anyone done a wrapper for windows ReadDirectoryChangesW?
> >> > I expected it in phobos windows.d but it's not there.
> >> >
> >> > Zz
> >> www.dsource.org/projects/bindings should have got it done
> >>
> >>
> >> --
> >> 使ç⨠Opera é�©åâ½æâ¬Â§Ã§Å¡âçâµåÂ�éâ®ä»¶å®¢æË፬â¹Ã¥Âºï¿½:
> >> http://www.opera.com/mail/
> >
> > Hi David,
> >
> > Thanks for the link the project WindowsAPI had the wrappers and it works
> > with a little modification to FILE_NOTIFY_INFORMATION.
> >
> > Zz
>
> What are the modifications? Could you commit them, please?
I removed what I need from WindowsAPI and pasted it into my project since I use D 2.0 and not 1.0.
I just changed FILE_NOTIFY_INFORMATION so that it looks like the following (which is more like the original definition in MSDN).
Note: I removed _FileName;
struct FILE_NOTIFY_INFORMATION
{
DWORD NextEntryOffset;
DWORD Action;
DWORD FileNameLength;
WCHAR FileName;
}
Where you have got to cast to get FileName.
It was good enough for what I needed to do.
You can also look at Watcher http://www.dsource.org/projects/watcher where it's done differently and works with Mango.
Zz
More information about the Digitalmars-d
mailing list