Entwickler-Ecke

Windows API - FindFirstNotification


lambruco - Do 04.09.03 13:44
Titel: FindFirstNotification
Moin Forum,

sorry für das vielleicht "unpassende" Thema, aber ich weiss nicht, wie ich mein Problem besser umschreiben sollte. :oops:

Jetzt mein Problem:
Ich möchte einen Ordner auf Veränderungen überwachen und benutzte dafür "FindFirstChangeNotification". Wenn sich jetzt etwas getan hat, möchte ich genau die Datei haben, in der etwas passiert ist.
Wie kann ich das jetzt herausfinden, oder gibt es da schon eine mir noch unbekannte Funktion ?


Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
while not (terminated) and (FindNextChangeNotification(m_hNotify))do
       begin
          Application.ProcessMessages;
          dwWaitStatus := WaitForSingleObject(m_hNotify, 500);
          if dwWaitStatus = WAIT_FAILED then
            begin
              RaiseLastOSError();
              break;
            end;
          if dwWaitStatus = WAIT_OBJECT_0  then
            begin
              Function
              Application.ProcessMessages;
            end;
        end;
    end;


Oder ist hier schon was falsch ??


MSCH - Do 04.09.03 18:05

leider nein, zumindest ist mir keine bekannt. Ich hatte das gleiche Prob, habs dann so gelöst, das ich mir die Files merke.
grez
msch