Article View: borland.public.cppbuilder.nativeapi
Article #10035Re: Using Damon Chandler's FindNextChangeNotification example
From: JD
Date: Sun, 23 May 2004 04:06
Date: Sun, 23 May 2004 04:06
41 lines
2491 bytes
2491 bytes
"Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> wrote:
> How are you calling FindFirstChangeNotification to begin with?
SomeHandle = FindFirstChangeNotification(
// lpPathName
// Points to a null-terminated string
// that specifies the path of the
// directory to watch.
WatchPath.c_str(),
// bWatchSubtree
// if it is FALSE, it monitors only the
// specified directory.
false,
// dwNotifyFilter
// can be one or more of the following
// values:
// FILE_NOTIFY_CHANGE_LAST_WRITE
// Any change to the last write-time of
// files in the watched directory or
// subtree causes a change notification
// wait operation to return.
FILE_NOTIFY_CHANGE_LAST_WRITE );
> Are you requesting multiple notifications?
I assume that you're asking about my call to WaitForMultipleObjects:
WaitForMultipleObjects( 1, &SomeHandle, false, 2000 );
I honestly believe that if you try Damon's code that you'll
get a double notification too. It's easy to understand how
this might have been overlooked in the sample - as long as the
view was updated ... everything was ok.
Later today I'll try it outside of a thread to see how it behaves.
~ JD
Technical Details
Message-ID:
<40b0233e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40ade94f$1@newsgroups.borland.com> <40af63b7$1@newsgroups.borland.com> <40af8def$1@newsgroups.borland.com> <40afda3f$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,32a59cffbb6bea4a X-Google-Attributes: gid10cc67,public From: "JD" <nospam@nospam.com> Sender: "JD" <nospam@nospam.com> Reply-To: "JD" <nospam@nospam.com> Subject: Re: Using Damon Chandler's FindNextChangeNotification example Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 172.142.244.161 References: <40ade94f$1@newsgroups.borland.com> <40af63b7$1@newsgroups.borland.com> <40af8def$1@newsgroups.borland.com> <40afda3f$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <40b0233e$1@newsgroups.borland.com> Date: 22 May 2004 21:06:22 -0700 X-Trace: newsgroups.borland.com 1085285182 207.105.83.66 (22 May 2004 21:06:22 -0700) Lines: 42 Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail