🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #10036

Re: Using Damon Chandler's FindNextChangeNotification example

#10036
From: Remy Lebeau (TeamB)
Date: Sun, 23 May 2004 04:59
36 lines
2563 bytes
"JD" <nospam@nospam.com> wrote in message
news:40b0233e$1@newsgroups.borland.com...

>                      FILE_NOTIFY_CHANGE_LAST_WRITE );

That will be triggered whenever a file has been written to.  Are you sure
that a single file isn't simply being written to over and over between calls
to FindFirst/NextChangeNotification(), or that multiple files are being
modified at the same time?

Part of the problem with the change notification system is that there is no
way to determine what file has actually been changed and why.  That is why I
suggest SHChangeNotifyRegister(), becaue it does support those kinds of
things.

> I assume that you're asking about my call to WaitForMultipleObjects:

No. I'm asking because of the fact that you are getting multiple events
triggered.  That suggests that either you have multiple notifications set
up, or you have multiple monitors running in parallel.

Since you bring it up, though - why are you using WaitForMultipleObjects()
anyway?  You are not actually waiting on multiple objects to begin with, so
you should use WaitForSingleObject() instead.

> I honestly believe that if you try Damon's code that
> you'll get a double notification too

I see nothing wrong with Damon's code.  However, you have not shown all of
your own code, so I cannot compare the two.  Since you mentioned that you
did make some changes, I would have to suspect that you probably changed
something that you should't have.


Gambit
Technical Details
Message-ID: <40b030d4$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40ade94f$1@newsgroups.borland.com> <40af63b7$1@newsgroups.borland.com> <40af8def$1@newsgroups.borland.com> <40afda3f$1@newsgroups.borland.com> <40b0233e$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: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <40ade94f$1@newsgroups.borland.com> <40af63b7$1@newsgroups.borland.com> <40af8def$1@newsgroups.borland.com> <40afda3f$1@newsgroups.borland.com> <40b0233e$1@newsgroups.borland.com>
Subject: Re: Using Damon Chandler's FindNextChangeNotification example
Date: Sat, 22 May 2004 21:59:29 -0700
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.135.163
Message-ID: <40b030d4$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1085288660 67.22.135.163 (22 May 2004 22:04:20 -0700)
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail