VFP 6.0 SP5 and VFP 7.0 (tech preview) - I hadn't thought of it till you mentioned sys(2000). I actually got the tip from Glenn Domeracki back then, and I believe he reported it. But as you are kindly implying, I should have re-checked this on the newer version(s) before reporting it as a potential problem - thanks for keeping me honest. I'm off to find that test program!
Rick
>Rick,
>
>Thanks for info. Under what VFP vesrsions did you test it? Did you report it as a bug to MS?
>
>>Sergey,
>>This last I checked, SYS(2000) was still leaving file handles open, so if you make a lot of these calls, you'll find you're "leaking" memory. I use the equivalant API calls instead and have no problems.
>>Declare Integer FindFirstFile in win32api string lpFileName, string @ lpFindFileData
>>Declare Integer FindNextFile in win32api integer hFindFile, string @ lpFindFileData
>>Declare Integer FindClose in win32api integer hFindFile
>>
>>Rick
>>