I am trying to write a little program to monitor a directory and its
sub-trees.

I get FindNextChangeNotification, FindNextChangeNotification and
FindCloseChangeNotification to work fine
but when they pop I can't tell what file changed.

I've looked at ReadDirectoryChangesW but I can't get it to compile - it says
"undeclared identifier".

Is there anyway to get this info?

I'd hate to have to step through the directories one by one.

Thanks in advance,
-- Tom Swezey
--
**** Signature **** (KISS: Keep It Simple, STUPID!) ****
Check out my Web Site: http://www.winternet.com/~swezeyt
(o o) E-mail me at swezeyt@winternet.com
oOO*( )*OOo*********************************************

Re: FindNextChangeNotification by Scott

Scott
Tue Jun 22 07:13:23 CDT 2004

TFS wrote:
> I am trying to write a little program to monitor a directory and its
> sub-trees.
>
> I get FindNextChangeNotification, FindNextChangeNotification and
> FindCloseChangeNotification to work fine
> but when they pop I can't tell what file changed.
>
> I've looked at ReadDirectoryChangesW but I can't get it to compile - it says
> "undeclared identifier".
>
> Is there anyway to get this info?
>
> I'd hate to have to step through the directories one by one.
>
> Thanks in advance,
> -- Tom Swezey

Since ReadDirectoryChangesW is not available for Win95 and derivatives,
you must compile your program only for WinNT and above to see this
function. To do this you #define certain macro(s) prior to including
the windows headers. See 'Using the SDK Headers' in MSDN.

#define _WIN32_WINNT 0x0400 // Windows NT or later required
#include <windows.h>

--
Scott McPhillips [VC++ MVP]


Re: FindNextChangeNotification by TFS

TFS
Thu Jun 24 03:51:08 CDT 2004

Thanks,

-- Tom Swezey
--
**** Signature **** (KISS: Keep It Simple, STUPID!) ****
Check out my Web Site: http://www.winternet.com/~swezeyt
(o o) E-mail me at swezeyt@winternet.com
oOO*( )*OOo*********************************************