I have a thread that monitors a folder for new files, using
FindFirstChangeNotification, FindNext... and FindClose....
I use WaitForSingleObjectEx to be signaled and a Syncronized callback to
notify the main app and refresh the gui.
It seems to work ok when we just have one folder to monitor
My question is could I safely monitor 3 folders, not in the same tree by
giving each a separate handle in the
FindFirstChangeNotification and then do something like this:
vRslt := WaitForSingleObjectEx(vHndle1, 1000, True) or
WaitForSingleObjectEx(vHndle2, 1000, True) or WaitForSingleObjectEx(vHndle3,
1000, True)
if not Terminated then
begin
if vRslt = WAIT_OBJECT_0 then
try
finally
end
end;
I suspose I could do a thread for each folder I want to monitor, but I am
really looking for the most efficient way to do this.
E. D. Epperson Jr.