FindFirstChangeNotification - где Ошибка?
Подскажите, где я ошибся и ошибся ли я?
Требуется выяснить, изменялось ли содержимое папки.
Public Function FStatusMonitoring(MonitoringPath As String, Form As Form)
Dim Ret As Long
Dim RetVal As Long
Dim Str As String
Ret = FindFirstChangeNotification(MonitoringPath, True, FILE_NOTIFY_CHANGE_LAST_WRITE)
Form.Label1.Caption = ""
Str = "Contents of a folder " & MonitoringPath & " are changed." & vbCrLf
Form.Label1.Caption = Str
Form.Label1.Refresh
FindNextChangeNotification Ret
RetVal = WaitForSingleObject(Ret, 1000)
FindCloseChangeNotification Ret
End Function
Спасибо!