Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi FindNextChangeNotification und Vista (https://www.delphipraxis.net/106639-findnextchangenotification-und-vista.html)

Roland Wind 14. Jan 2008 12:13


FindNextChangeNotification und Vista
 
Hi Leute

Leider mußte ich bei Tests meines Programmes unter Vista feststellen, dass die Funktion FindNextChangeNotification anscheinend anders funkt.

Folgender Code:

Delphi-Quellcode:
    while not Terminated and (FNotifyHandle <> INVALID_HANDLE_VALUE) do
    begin
      Handles[0] := FNotifyHandle;
      Handles[1] := FEvent;
      case WaitForMultipleObjects(2, PWOHandleArray(@Handles), False, INFINITE) of
        WAIT_OBJECT_0:
          if not Terminated then begin
            DoChange;
            if not FindNextChangeNotification(FNotifyHandle) then begin
              FLastError := GetLastError;
              Break;
            end;
          end;
        WAIT_OBJECT_0 + 1:
          Break;
        WAIT_FAILED:
          begin
            FLastError := GetLastError;
            Break;
          end;
      end;
    end;
Unter Vista wird die Funktion FindNextChangeNotification anscheinend immer durchlaufen, auch wenn keine Änderungen im Verzeichnis vorgenommen wurden. In der MSDN gibts da zwar auch schon einen Anfrage, aber leider keine Lösung. Hat einer eine Idee ???


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:07 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz