Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Event trapping
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00595551
Message ID:
00595682
Vues:
26
Thanks Ed, I'm going to be writing this in VB as an ActiveX control (probably write the main system in VB too!

I found a solution in MSDN but it relates to VS.NET - even though it's not available yet!

>>
>>There's a family of API calls that can be used to monitor a folder or subtree for changes, triggering an event at the OS level whenever certain classes of changes occur, such as the addition or deletion of a file to a folder. The API functions require a callback, so it can't be implemented just in VFP with the DECLARE...DLL syntax; you'll need an ActiveX control or FLL that will hand you a callback address and will raise a UI event whenever a change is detected. If you like, I can dig out the information for the API calls; you can create the necessary ActiveX containing a callback function using VB.
>
>FWIW, the API calls involved are FindFirstChangeNotification(), FindNextChangeNotification(), FIndCLoseChangeNotification() and then one or more of the event monitoring APIs such WaitForSingleObject().
>
>There's detailed C code available in the MSDN library docs under the topic "Monitoring Changes in a Directory or Directory Tree" in the Platform SDK: File Storage area. It uses WaitForMultipleObjects() rather than WaitForSingleObject(), and polls continuously, so that no callback is invoked. You could use this as a template for an idle event in VFP.
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform