|
|
Comments and Discussions
|
|
 |

|
Hi Jones,
Quite often, if i don't refresh the directory in Explorer or I finished writing the file and close it, ReadDirectoryChangesW can't detect the size change of the file during the writing process. I have read a lot of references, but failed to find a solution. Could you help me explain this? I really look forward to your reply. The following are main snippets of my code:
By the way, please forgive me for my poor English. Thank you very much.
CreateFileA:
hDirectoryHandle = ::CreateFileA(
file.c_str(),
FILE_LIST_DIRECTORY,
FILE_SHARE_READ
| FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS,
NULL);
ReadDirectoryChangesW:
if(!::ReadDirectoryChangesW(
hDirectoryHandle,
buffer.get(),
nBufferSize,
bIncludeSubdirectories,
FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_CREATION | FILE_NOTIFY_CHANGE_SIZE,
&dwBytes,
NULL,
NULL) || GetLastError() == ERROR_INVALID_HANDLE)
{
break;
}
|
|
|
|

|
Hi i have used your code for reference and its working fine but along with this i need one more option of file printing log,Kindly can you suggest me how to watch the files if the file is given for print.Thank You in advance.
|
|
|
|

|
These codes are helpful for me. But they still miss events. Next, I'd like to describe it in detail.
First,I'd like to explain how I've used these codes in my project and share my experience.
Trouble 1:After adding four source files kindly provided by Mr Wes Jones through code project, there should be compile errors.
Solution:1.1、Add this code - "#define _WIN32_WINNT 0x0500" in front of "#include..." in "stdAfx.h"
&1.2、Build → Set active configuration... → XX-win32 debug or XX-win32 release → OK
Trouble 2:How to use these codes
Solution:Rewrite Class CDirectoryChangeHandler_ListBox.
2.1、Make the least change to use these codes(Directly use source codes kindly provided by Wes).
For example, when a file is added in my watch directory,I want a pop-up message box. Then I will add codes in function "On_FileAdded" in the file "DirWatcherDlg.h" as below.
HWND hWnd=m_listBox.GetSafeHwnd();
MessageBox(hWnd,"OK","Notice",0);
As you can see, we just need to use m_listBox.GetDC(),m_listBox.ReleaseDC(),m_listBox.FindWindow() ..., m_listBox.XX(/*FunctionName,it must be able to be called by CListBox members*/)() to get what you want for a simple application.
2.2、Simplify functions of these codes.
2.2.1 Create a new project based on dialog(eg: Project name is Test).
2.2.2 Operation about dialog resource.
Add essential rescources(A button & a listbox) in project TestDlg. Create a message for left click on the button(named test) and a CListBox type variable for the listbox(eg. m_lstChanges).
2.3.2 Modify header files: Copy or create class CDirectoryChangeHandler_ListBox and add two variables'
a. Copy codes about class CDirectoryChangeHandler_ListBox from head file "DirectoryChanges.h" and add it in the head file of newly created project dialog(TestDlg.h).
b. Copy this two lines from "DirWatcherDlg.h" as below and add them in project dialog head file(TestDlg.h).
CDirectoryChangeWatcher m_DirWatcher;
CDirectoryChangeHandler_ListBox m_DirChangeHandler;
Remember to include "DirectoryChanges.h".
2.3.3 Modify cpp files: Add one function and implement message by clicking on the test button.
a. Copy the body of function GetLastErrorMessageString and add it to implementation file of our dialog(TestDlg.cpp).
b. Copy the following codes and add it into the body of message function produced by clicking on the button(named Test) in our dialog cpp file(TestDlg.cpp). These codes have already delete the filter function(Codes in bold have been modified).
DWORD dwWatch = 0;
const char* pDirectoryToMonitor="E:\\My Documents\\My Pictures";
if( ERROR_SUCCESS != (dwWatch = m_DirWatcher.WatchDirectory(pDirectoryToMonitor,
FILE_NOTIFY_CHANGE_FILE_NAME/*dwChangeFilter*/,
&m_DirChangeHandler,
FALSE/*bWatchSubDir*/,
NULL/*m_strIncludeFilter1*/,
NULL/*m_strExcludeFilter1*/)) )
{
MessageBox(_T("Failed to start watch:\n") + GetLastErrorMessageString(dwWatch) );
}
c. Add the following two lines of codes in the parameter list of constructor of class TestDlg in our dialog cpp file(TestDlg.cpp).
CTestDlg::CTestDlg(CWnd* pParent /*=NULL*/)
: CDialog(CTestDlg::IDD, pParent)
,m_DirWatcher( true )
,m_DirChangeHandler( m_lstChanges )
Compile,link and run, then copy sth it the watched directory, what you have copied will appear in the list box.
2.3、Add new controls to the project mentioned in 2.2.
In this project, I've added a static picture control to show images added in my watch directory. Then how shall we modify these codes.
2.3.1 First,give a unique control ID to this static control,and add a type of CStatic member variable -m_staticShowImg for this ID.
2.3.2 Then, in the definition of "CDirectoryChangeHandler_ListBox " just close to this code - "CListBox & m_listBox;", add "CStatic & m_staticImg;".
2.3.3 Third, add a new parameter in the parameter list of constructor of class CDirectoryChangeHandler_ListBox as below:
CDirectoryChangeHandler_ListBox(CListBox & list_box,CStatic & staticImg)
: CDirectoryChangeHandler(),
m_listBox( list_box ),
m_staticImg( staticImg ) {}
2.3.4 Fourth, add a CStatic parameter in constructor of CDirWatcherDlg(or your own dialog)
CDirWatcherDlg::CDirWatcherDlg(CWnd* pParent /*=NULL*/)
: CDialog(CDirWatcherDlg::IDD, pParent)
,m_DirWatcher( true )
,m_DirChangeHandler( m_lstChanges, m_staticShowImg(a CStatic member variable created in 2.3.1) )
2.3.5 Fifth, add your own code in the body of On_FileXX in class CDirectoryChangeHandler_ListBox.
HWND hMCImgWnd=m_staticImg.GetSafeHwnd();
CRect rt(0,0,240,240);
CDC* pMCdc=m_staticImg.GetDC();
img.AttachFromFile(strFileName);/*(img is a instance of another Class about image processing)*/
img.Draw(pMCdc,rt);
// MessageBox(hMCImgWnd,"OK","char",0);
m_staticImg.ReleaseDC(pMCdc);
Then,here comes my question.
Compile,link,run my project.everything is OK till now.
But after I clicked the test button when I copy image files in my watch directory, it's seldom show all the images I've copied for test. Sometimes,it shows half of the copied images regularly with one showing after another missing.Sometimes, it doesn't show any picture no matter how many times you've copied and how long you're waiting for.
Another question worrying me is how I can show two consecutive images at the same time.
Yanay Sun
Yanay Sun modified on Thursday, September 1, 2011 5:07 AM
|
|
|
|

|
First of all, great work. But... there is a problem, and I quite can't put my finger on it because the code is too complicated Still working on it.
All goes fine if you get events for one or few file(s) at a time in your watched folder; but if you are watching a folder with A LOT of activity (even worse, with subfolders, on a SSD drive), you miss events.
First, the PostThreadMessage fails miserably because the thread queue is limited to 10k events; since one gets 3 or more events per file when, say, it is created, this makes it happen for less than 3000 real file events.
So, besides writing a custom queue, one may wait for the notified thread to deal with some messages, then try and post again. This only adds up to the time spent in "On_FileAdded". So far, so good, but this is where you start missing events.
You can simulate this by adding a sleep call in DirectoryChanges.cpp, line 1906, just before the break. The more you 'sleep', the more events you will loose, eventually all of them.
As I said, I'm still working on understanding the problem, but can anyone help ?
Thanks,
Stefan.
|
|
|
|
|

|
i can't get 'copy event '
ReadDirectoryChangesW can't do this ?
what about hook
|
|
|
|
|

|
For cimpile in VS 2008 need add:
friend class CDelayedDirectoryChangeHandler;
in
declaration of class CDirectoryChangeHandler
|
|
|
|

|
Any chance to compile this under C++Builder (BCB) ?
Compiler stops at the first CString.
CCriticalSection and other C... classes seem to be further problems.
|
|
|
|

|
It's so good and useful code,Thanks a lot!
|
|
|
|

|
hi,wes jones.
If i modify the code like this, it also works.
void CDirectoryChangeWatcher::ProcessChangeNotifications()
{
.....
CDirectoryChangeHandler * pChangeHandler = pdi->GetChangeHandler()->GetRealChangeHandler();
....
}
Now,the Change Notification would be processed in the thread that monitors directory changes.
I want to know the reason that you use another worker thread to process the change notification.
I feel sorry for my poor english.I hope you can understand that and give me an answer.Thanks.
|
|
|
|

|
Hi,
I'm working on an application which monitors a directory using win api ReadDirectoryChangesW() . When monitoring the directory, this api sends FILE_ACTION_MODIFIED event in case a file/sub-directory is modified in the monitored directory. It doesn't tell what specifically has changed in the file or sub-directory since the time the file/ sub-directory entry was created in the monitored directory e.g size, timestamp or attributes or am I missing something. Is there any way to get what exactly has been modified viz size/timestamp/attirbutes since the time the file entry was created?
Thanks
Raj
|
|
|
|

|
Hello,
I am not being able to save the binary files in the watched folder (For example a word document from MS Word). Text file is OK. How can I overcome this?.I am using vista.
Jack..
modified on Thursday, July 15, 2010 2:00 AM
|
|
|
|

|
I test it in windows 7, but it don't work. Could you please tell me the reason? thanks.
|
|
|
|

|
When I use your class in XP sp2.It works fine, but turn to XP sp3, when I drag a directory into the watched directory,only the directory name is found,all of the files in it have no notify message.Can you tell me what's wrong with it?Thanks.
|
|
|
|

|
the Message when happend, such as On_FileRemoved(),it's happend before or after?
when i need copy files before removed,how can i do
|
|
|
|

|
Hi,
Thanks fopr posting this, its very useful. I tried watching a USB drive, and it does not seem to see file changes that happen on that drive.
Also, to the best of your knowledge, do you know of scenarios where your app would miss file changes (on regular drives, not necessarily on USB)
Thanks again,
Max
|
|
|
|

|
I just have written a directory watcher...but i found if i add or remove lots of files of the directory which be watched~~the watcher would lost some informations ~~~
I make it with asynchronism~~~but i couldn't find where existed the problem~~
then i saw your program~~~it's my need~~so i'm very excited~~~i will read your code earnestly~~
thank you ~~
my e-mail address is:zjj9850@vip.qq.com
i want to communicate with you~~
Expect your reply~
|
|
|
|

|
it's nice work, thks very much!
|
|
|
|

|
As the title shows,
If I wanna monitor the local computer's file system,
that is to say I wanna record the information, such as file added,modified,removed and so on.
What should I do? and Which API should I hook?
|
|
|
|

|
Hi
How can I get code in C# ??
thanks
AE
|
|
|
|

|
When I use ReaddirectorychangesW for getting change in a directory under linux (with samba), it doesn't work.
Do you have any idea ??
|
|
|
|

|
Hello Sir
How can i watch added files information multiple.I have a application which have 10Drive all drive active at the time of application start.I need to make record only file added.User can send multiple file or folder at the same time at any directory of system.
What happen currently file files/folder application ony one record but second one in not recorded.First file size is 1GB and second file size is 12MB,then problem occured.Basically Admin make backup of these files/folder which is new added in Drive.I need your help,becoue i use your article i make a project.Plz help me
|
|
|
|

|
Hi Wes jones
I read your article and check demo,it's really good article.But when i complie your code then getting error.Error error C2248: 'CDirectoryChangeWatcher::CDirWatchInfo' : cannot access private class declared in class 'CDirectoryChangeWatcher'
'CDirectoryChangeWatcher::CDirWatchInfo'
error C2248: 'CDirectoryChangeWatcher::CDirWatchInfo' : cannot access private class declared in class 'CDirectoryChangeWatcher'
Can you give me advice what can i do for solve the error.
Thank in Advance
|
|
|
|

|
Hi
i read this article.It's a nice article thanks Mr. Wes Jones.I want to know through this article can i get information about Folder only which is added?
Or i want to know only folder notification?
|
|
|
|

|
Directory has some files, delete directory, No have delete file information record .
how to get delete file information , when delete directory.
|
|
|
|
|

|
If I have 4 disks( c: d: e: f ,
do I need to call WatchDirectory for 4 times?
Thanks
|
|
|
|

|
I'm glad to see that this test app and other users also exhibit those redundant FILE_ACTION_MODIFIED messages. I'm also glad to see others have kinda dismissed this as the OS sending separate messages for individual changes that occur when copying a file.
Do these redundant messages always appear as entires within the same buffer read with ReadDirectoryChangesW? Or, can these redundant messages be broken across multiple calls to that function? In my tests, they all seem to be part of the same buffer from a single ReadDirectoryChangesW call.
Since they're all grouped together I'm thinking about making a class that manages this buffer (similar to your CFileNotifyInformation) except that the GetNextNotifyInformation()-like function will skip redundant FILE_ACTION_MODIFIED messages.
And a gripe:
What is it with Microsoft engineers and how they insist of giving partial info that requires the programmer to make intelligent guesses? They do this all the time! For example, why is the original filename separated from the FILE_ACTION_RENAMED_NEW_NAME message? Why doesn't FILE_ACTION_REMOVED report if the item is a file or folder? It's removed so it's not like I can check! Why don't these messages have any flags whatsoever? It must have been the Friday before a 3 day weekend when that Microsoft engineer designed this API!
|
|
|
|

|
delayeddirectorychangehandler.h(297) : error C2248: 'CDirectoryChangeWatcher::CDirWatchInfo' : cannot access private class declared in class 'CDirectoryChangeWatcher'
I worked around that one by changing the section within CDirectoryChangeWatcher that declared CDirWatchInfo from private to public.
After fixing that I received:
directorychanges.cpp(1178) : error C2065: 'i' : undeclared identifier
I fixed this one by defining 'i' outside the for loop.
Once I made these changes the code compiled, linked, and ran.
|
|
|
|

|
you demo is great
but I use ReadDirectoryChangeW to a new program on my own in a Thread like this
but why i can't get file add or delete event on NTFS volume
why???
Thank you
static void Action(CSpyDlg* dlg)
{
USES_CONVERSION;
HANDLE hDir = CreateFile( CString("c:"), FILE_LIST_DIRECTORY, FILE_SHARE_READ|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS|FILE_FLAG_OVERLAPPED, NULL );
FILE_NOTIFY_INFORMATION Buffer[4096];
DWORD BytesReturned;
while(ReadDirectoryChangesW(
hDir, &Buffer, sizeof(Buffer), TRUE, FILE_NOTIFY_CHANGE_SECURITY|
FILE_NOTIFY_CHANGE_CREATION|
FILE_NOTIFY_CHANGE_LAST_ACCESS|
FILE_NOTIFY_CHANGE_LAST_WRITE|
FILE_NOTIFY_CHANGE_SIZE|
FILE_NOTIFY_CHANGE_ATTRIBUTES|
FILE_NOTIFY_CHANGE_DIR_NAME|
FILE_NOTIFY_CHANGE_FILE_NAME, &BytesReturned, NULL, NULL ))
{
CTime tm = CTime::GetCurrentTime();
CString helper_txt;
switch(Buffer[0].Action)
{
case FILE_ACTION_ADDED: helper_txt = "The file was added to the directory"; break;
case FILE_ACTION_REMOVED: helper_txt = "The file was removed from the directory"; break;
case FILE_ACTION_MODIFIED: helper_txt = "The file was modified. This can be a change in the time stamp or attributes."; break;
case FILE_ACTION_RENAMED_OLD_NAME: helper_txt = "The file was renamed and this is the old name."; break;
case FILE_ACTION_RENAMED_NEW_NAME: helper_txt = "The file was renamed and this is the new name."; break;
}
int i=0;
do
{
m_Sec.Lock();
int item = dlg->m_list.InsertItem(dlg->m_list.GetItemCount(),
CString(Buffer[i].FileName).Left(Buffer[i].FileNameLength / 2)
+ " - " + helper_txt );
dlg->m_list.SetItemText(item, 1, tm.Format("%Y/%m/%d/ - %H:%M:%S"));
i++;
m_Sec.Unlock();
}
while (!Buffer[i].NextEntryOffset);
}
}
|
|
|
|

|
directorychangewatcher is use MFC, i want make a win32 dll, how can i do?
You Suffer,But Why?
|
|
|
|

|
when i paste a file, i got w file add event, how can i get the correct event???
You Suffer,But Why?
|
|
|
|

|
I found a bug in the wildcmp function. The _toupper calls must be replaced with:
#if defined(UNICODE) || defined(_UNICODE)
if ((towupper(*wild) != towupper(*string)) && (*wild != _T('?')))
#else
if ((toupper(*wild) != toupper(*string)) && (*wild != _T('?')))
#endif
_toupper documentation (MSDN):
The _tolower and _toupper routines are locale-independent, much faster versions of tolower and toupper.
Can be used only when isascii(c) and either isupper(c) or islower(c), respectively, are nonzero.
Have undefined results if c is not an ASCII letter of the appropriate case for converting.
So the _toupper has no meaning of unicode/not-unicode function define
Reproduce:
If you add an upper-case filter, the comparison with the lower-case file extension is wrong, because of adding 'A' -'a' once more.
|
|
|
|

|
excellent code, thanks for your effort!!!
i am running this in a machine which has WIN-XP SP2, PSDK is installed
and with DOTNET 2005 ENTERPRISE EDITION
everything is working fine when it is console application
i am trying to convert it as a windows service(console app) but method is not called if it is a service...but i tried to debug the code,
attached the DOTNET2005 debugger to the running service.
i set a breakpoint inside the method On_FileModified now it is called..
if debugger is detached and i tried to rename a folder now the method is not getting called...
kindly could you tell me why...
thanks in advance...
|
|
|
|

|
When you're moving a large file to a directory and ReadDirectoryChangesW detects the file but the file is still moving into the directory so it's locked for processing. How can you tell whether it's locked because it's still moving or whether it's actually locked?
|
|
|
|

|
This question isn't really about the class, but about how ReadDirectoryChangesW reports changes to files and folders stored by a mac... onto NTFS as a file server.
For this real path:
C:\dev\macbug1\This is the Mac folder\In this folder I will store some mac image files\this is just a folder with a long filename - In this folder I will store some mac image files\another In this folder I will store some mac image files\This folder contains some pictures of the new cooooooool macboc air\overview_bigair_one20080115.png
ReadDirectoryChangesW reports a change to this file:
C:\dev\macbug1\.BAHC3Kq7\This is the Mac folder\In this folder I will store some mac image files\this is just a folder with a long filename - In this folder I will store some mac image files\another In this folder I will store some mac image files\This folder contains some pictures of the new cooooooool macboc air\overview_bigair_one20080115.png
I was wondering if you had a clue as to what that "signature" might mean -- and how do I get rid of it?
|
|
|
|
|

|
Hello,
I use the ReadDirectoryChangesW API with sub directory flag = true and listening to the whole file system ("C:\\"),
when i delete some of files together i get an alerts about each file that removed BUT when i remove a directory that contain files and directories the alert is only about the root directory that was deleted without alerts about all the files and directories (and each of one AS EXPECTED)that deleted recusivly as a result from delete the "root" directory (its obviuos when deleting a directory all the tree that found above deleted too) - so i thought that i get an alerts for each "child" in the tree - IS IN IT?
THANKS ALOT,
BEST REGARDS!
|
|
|
|

|
Hi man
I write my handle process like this is On_FileAddes. I do read the comment of On_WatchStoped, there will be some unvailable handles what lead to errors becuase I creat some objects in On_FileAddes section.
Do you have a comman idea on my request, the file added event will trigger lots of things in my application such as manipulate database, read xml files and move them.
class CDirectoryChangeHandler_ListBox : public CDirectoryChangeHandler
{
public:
CDirectoryChangeHandler_ListBox(CListBox & list_box1, CListBox & list_box2, CListBox & list_box3, CADODatabase* database, CADORecordset* recset, CADOCommand* command, CString& localPath, CString& serverPath, CString& localDatabase)
: CDirectoryChangeHandler(),
m_listBox1( list_box1 ), m_listBox2( list_box2 ),m_listBox3( list_box3 ), db(database), rs(recset), cmd(command), m_localPath(localPath), m_serverPath(serverPath), m_localDatabase(localDatabase){}
protected:
//These functions are called when the directory to watch has had a change made to it
void On_FileAdded(const CString & strFileName)
{
m_listBox1.AddString( _T("File Added: ") + strFileName);
TCHAR fileName[MAX_PATH];
//I put a long process with some objects creation here, and if I stop watch or quit the application, there will be an error occur.
}
A chinese farmer.
|
|
|
|

|
i down the demo project but it is not correct.
who can give me the demo project
thanks
|
|
|
|

|
I am having troubles converting this example to a console application. I've included MFC in the console application, but I still get the following errors. Can anyone help me out with this?
--------------------Configuration: TestDirWatch - Win32 Debug--------------------
Compiling...
DirectoryChanges.cpp
\DirectoryChanges.cpp(1657) : error C2065: 'ReadDirectoryChangesW' : undeclared identifier
TestDirWatch.cpp
\delayeddirectorychangehandler.h(239) : error C2504: 'CDirectoryChangeHandler' : base class undefined
\delayeddirectorychangehandler.h(297) : error C2027: use of undefined type 'CDirectoryChangeWatcher'
\delayeddirectorychangehandler.h(18) : see declaration of 'CDirectoryChangeWatcher'
\delayeddirectorychangehandler.h(297) : error C2079: 'CDirWatchInfo' uses undefined class 'CDirectoryChangeWatcher'
\delayeddirectorychangehandler.h(297) : error C2433: 'CDirWatchInfo' : 'friend' not permitted on data declarations
\delayeddirectorychangehandler.h(297) : error C2244: 'CDirWatchInfo' : unable to resolve function overload
Generating Code...
Error executing cl.exe.
TestDirWatch.exe - 6 error(s), 0 warning(s)
|
|
|
|

|
Sometimes, we should get long path of changed files, but if you rename or delete a file, the original file would be lossed, so we can not get it by GetLongPathName. So any program use ReadDirectoryChangesW have this problem, who can fix it ??
|
|
|
|

|
Hi There
I have been using this code very successfully in a non-Unicode project which has just been ported. The messages fail to be posted to the parent window. Any pointers in using this code in a Unicode project?
Many Thanks
|
|
|
|

|
Hi,
Your example is great and very useful. I have a usage question: I want to use this code to detect when applications write files to a specific directory, and then do something with those files (such as send them to another computer for backup purposes). Is there an easy way to know when the file that was detected is ready to be operated upon? I am thinking of the case of a large file, say 1 GB; surely your code will detect the new file before the file is completely written to. What do you suggest would be a good way to know when the file has been closed, so that I can start my process on it?
Thanks and best regards.
|
|
|
|

|
I have met the same problem like this:
When monitorring a removable disk with this program, I can not detatch my removable disk! A warnning dialog always jumps out. I have tried to improve the program following your advice, but I found that no WM_DEVICECHANGE message arrive before I can close the worker process. Any help?
|
|
|
|

|
Hi, When I try to compile the project file on VS2003, I get the following error messages:
[code]
DelayedDirectoryChangeHandler.cpp
c:\documents and settings\sean\desktop\filewatchapp\delayeddirectorychangehandler.h(297) : error C2248: 'CDirectoryChangeWatcher::CDirWatchInfo' : cannot access private class declared in class 'CDirectoryChangeWatcher'
c:\documents and settings\sean\desktop\filewatchapp\directorychanges.h(414) : see declaration of 'CDirectoryChangeWatcher::CDirWatchInfo'
c:\documents and settings\sean\desktop\filewatchapp\directorychanges.h(357) : see declaration of 'CDirectoryChangeWatcher'
DirectoryChanges.cpp
c:\documents and settings\sean\desktop\filewatchapp\delayeddirectorychangehandler.h(297) : error C2248: 'CDirectoryChangeWatcher::CDirWatchInfo' : cannot access private class declared in class 'CDirectoryChangeWatcher'
c:\documents and settings\sean\desktop\filewatchapp\directorychanges.h(414) : see declaration of 'CDirectoryChangeWatcher::CDirWatchInfo'
c:\documents and settings\sean\desktop\filewatchapp\directorychanges.h(357) : see declaration of 'CDirectoryChangeWatcher'
c:\documents and settings\sean\desktop\filewatchapp\directorychanges.cpp(1178) : error C2065: 'i' : undeclared identifier
Generating Code...
Compiling...
SetFilterFlagsDlg.cpp
Generating Code...
Compiling...
DirWatcher.cpp
c:\documents and settings\sean\desktop\filewatchapp\dirwatcher.cpp(50) : warning C4996: 'CWinApp::Enable3dControls' was declared deprecated
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(4471) : see declaration of 'CWinApp::Enable3dControls'
Message: 'CWinApp::Enable3dControls is no longer needed. You should remove this call.'
[/code]
Any ideas on how I can fix the message
|
|
|
|

|
On Modify notification, no flag point to read
directly. Can I judge it from FILE_NOTIFY_CHANGE_LAST_ACCESS?
Thanks
-- modified at 9:57 Friday 27th April, 2007
|
|
|
|

|
Very great class!!!!
Very good!!!
Do you have a new version?
or
Are you updating CDirectoryChangeWatcher?
If you have a new version, open please!!
I expect...
thank you..;P
|
|
|
|

|
Your article is very nice
i did got a lot of idea.. when im doing file watcher..
hehe..
ahh.. any idea on
file watcher for fat base file system
mainly win98/Me
thanks..
saint
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
This class wraps up ReadDirectoryChangesW.
| Type | Article |
| Licence | |
| First Posted | 31 Jan 2001 |
| Views | 795,525 |
| Downloads | 23,062 |
| Bookmarked | 323 times |
|
|