[EMAIL PROTECTED] wrote: > Well this may be old hat for some, but ... > > Is there a way to find out how many open files an application has? > Some run-time call, some debug window from within the IDE or even XP's > Task Manager does not mater, at it just is something I want to check.
Task Manager has a "handles" column. I suspect it includes all kernel-object handles, not just files. So it would include thread handles, mutex handles, pipe handles, etc. It's probably a decent gauge for your purposes, though. > In fact I open a file (f : file declared as local var) in a > subroutine, read the file entirely to memory, but do not close it > again, I now see. (have adden a FileClose(f); now!) > > In fact I may call that subroutine a fairly huge number of times, > opening different files during a session. > Does that mean that I may end up with 100s of open files, or will they > be closed down automatically, as I leave the subroutine? Files don't get closed automatically unless your entire program shuts down. > And/or as the files opened repeat, will I only end up with the number > of different file names, or a number equivalent to the number of calls > to the subroutine? Every time you open a file, you get a new file handle, separate from the last. -- Rob _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

