Question

I received a "Too many open files" error when tried to do fopen (C++, Windows XP). Probably it happened because somewhere in my program I open files without closing them.

Is there a way on Windows to see a list of all open file descriptors (or all files that my program fopened)?

Was it helpful?

Solution

You can find a list of open handles in Process Explorer. You can also search all open handles in the system.

OTHER TIPS

Something like this might beof use...

My choice in such a case is the Sysinternals Process Explorer.

Rather than look for a Windows API to do it, why not keep track of it yourself? Write some function to do the opening and closing for you, and when they're called, keep track of what is opened and/or closed.

You have the info, so trying to get it from another source seems to make little sense to me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top