| |
|
|
 |
Description:
FindFirstChangeNotification prepares one „Änderungshandle’ with the Changes in a Ordner monitors go can.
Deklaration:
DEF @FindFirstChangeNotification(3) !kernel32,FindFirstChangeNotificationA
Parameter:
1.Parameter: address one Strings or Memory-Variable with a String, the whom Ordner contains, the on Changes monitors go should.
2.Parameter: One Flag the angibt, whether too The Unterordner monitors go should. => -0 = no Unterordner to supervise -1 = Unterordner to supervise
3.Parameter: Kombinationsflag the angibt, which Changes monitors go should.=> -$1 = (FILE_NOTIFY_CHANGE_FILE_NAME) Namensänderungen of Files go monitors. -$2 = (FILE_NOTIFY_CHANGE_DIR_NAME) Namensänderungen of Folders go monitors. -$4 = (FILE_NOTIFY_CHANGE_ATTRIBUTES) The Änderung of File- and Ordnerattributen becomes monitors. -$8 = (FILE_NOTIFY_CHANGE_SIZE) Größenänderungen go monitors. -$10 = (FILE_NOTIFY_CHANGE_LAST_WRITE) Schreibzugriffe go monitors. -$100 = (FILE_NOTIFY_CHANGE_SECURITY) an Änderung the Sicherheitsattribute go monitors. this Flag must only NT-based Systemen uses go.
Return Value:
with success the lever, the with of/ one Änderung zurückgegeben becomes. with one Error –1.
Examples:
CompileMarkSeparationDEF @FindFirstChangeNotification(3) !kernel32,FindFirstChangeNotificationA
DEF @WaitForSingleObject(2) !Kernel32,WaitForSingleObject
DEF @FindNextChangeNotification(1) Kernel32,FindNextChangeNotification
DEF @FindCloseChangeNotification(1) Kernel32,FindCloseChangeNotification
Declare Change_Pfad$,Change_Handle&,Change_Notify&
Windowstyle 31+512
Windowtitle Änderung eines Orners
Window 0,0-640,440
LET Change_Pfad$=@ChooseDir$(Bitte einen Orner zum Überwachen wählen:)
IF Change_Pfad$<>
Let Change_Handle&=@FindFirstChangeNotification(@ADDR(Change_Pfad$),1,$1 | $2 | $4 | $8)
Let Change_Notify&=-1
Whilenot @or(Change_Notify&=0,%menuitem=-2)
Let Change_Notify&=@WaitForSingleObject(Change_Handle&,500)
@FindNextChangeNotification(Change_Handle&)
wend
IF %MENUITEM<>-2
@Messagebox(In Pfad +Change_Pfad$+ gab es Änderungen! Eine neue Sicherung muß durchgeführt werden!,Hinweis,64+4096)
endif
@FindCloseChangeNotification(Change_Handle&)
endif
Ordner directory Unterordner directories to supervise Changes Änderung Change inform notification
|
|
|
| |
|
|