-
July 21st, 2004, 04:51 PM
#1
-
July 21st, 2004, 05:12 PM
#2
One possible solution is ReadDirectoryChangesW().
Kuphryn
-
July 21st, 2004, 05:36 PM
#3
I have a thread that does the same thing, but I search every 17.5 sec's and have little cpu useage. How many files do you have in the dir and what function are you using to get the file names??
Jim
ATP BE400 CE500 (C550B-SPW) CE560XL MU300 CFI CFII
"The speed of non working code is irrelevant"... Of course that is just my opinion, I could be wrong.
"Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination are omnipotent. The slogan 'press on' has solved and always will solve the problems of the human race."...Calvin Coolidge 30th President of the USA.
-
July 21st, 2004, 06:38 PM
#4
Originally Posted by Vanaj
I have a thread that does the same thing, but I search every 17.5 sec's and have little cpu useage. How many files do you have in the dir and what function are you using to get the file names??
Both of the directories don't have any files in them (until they appear from a external source, of course).
I'm using FindFirstFile() and FindNextFile(). I think I might be getting constant hits on '.' and '..', would ReadDirectoryChangesW() overlook those?
------------------------------------------------------
There are only 10 types of people in the world.
Those who understand binary and those that don't.
-
July 21st, 2004, 06:43 PM
#5
Are you looking for specific file extentions ?? or doing something like this ?
Code:
sprintf(szFullPathIn, "%s\\%s", pDlg->szPathIn, "*.QT");
hFindFile = FindFirstFile(szFullPathIn, &lpFindFileData);
Jim
ATP BE400 CE500 (C550B-SPW) CE560XL MU300 CFI CFII
"The speed of non working code is irrelevant"... Of course that is just my opinion, I could be wrong.
"Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination are omnipotent. The slogan 'press on' has solved and always will solve the problems of the human race."...Calvin Coolidge 30th President of the USA.
-
July 21st, 2004, 07:23 PM
#6
Originally Posted by mazeing
I read a post in this forum yesterday that used FindFirstChangeNotification and WaitForMultipleObjects to search two directories that I was hoping wouldn't use up the CPU, but I can't figure out the search string that
Thanks.
There is a technical reason behind why you cannot find FindFirstChangeNotification under the CG search, it has to do with the length of the indexed word. I will start the discussion on this issue for you and see if the powers that be can bump the number up
for now, try a search engine like google and plug in CG in the search, you should be able to find the CG thread where you saw the code posted in the results returned.
google:
findfirstchangenotification codeguru
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|