Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to detect a file update
Message
From
17/06/2008 14:43:23
 
 
To
17/06/2008 14:30:56
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, United States
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01324776
Message ID:
01324887
Views:
25
I seem to remember that Rick Strahl said he had done some extensive testing on different approaches, and that he also ended up using the timer/adir() construct.

>Hi Carlos,
>I suppose I'll try the timer/ADIR() approach and forget the API. Seems to be the consensus.
>
>Thanks, everyone for the suggestions.
>
>
>Gary
>
>>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform