Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to detect a file update
Message
De
17/06/2008 14:23:30
 
 
À
17/06/2008 11:32:26
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01324776
Message ID:
01324873
Vues:
27
>Hi all,
>
>I'm trying to figure out how to detect an update in a text file. I want to monitor updates to a log file from a 3rd party application. I looked at the VFP 9 sample and tweaked it to point at a specific file easily enough, but it only reports file deletion/creation, not updates to the file. Does anyone know how to intercept a file update?
>
>Thanks.
>
>Gary

Just a comment on the SHChangeNotifyRegister API function that the VFP sample uses, from MSDN:

"Note This function is available through Microsoft Windows XP Service Pack 2 (SP2) and Windows Server 2003. It might be altered or unavailable in subsequent versions of Windows."

This was an undocumented API function that MS was forced to document (I do not know the context of when and why, I think it had to do with the EU)

You can bet two things:

1. That the function is not properly documented.
2. That MS will change/remove this function in the future just to piss off and/or f....up every potential competitor that used it.

Myself, I would just go with a timer and check file dates.

Carlos Alloatti
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform