Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Did I miss the ability to find open files (of a process) with twapi?

66 views
Skip to first unread message

MartinLemburg@Siemens-PLM

unread,
Aug 4, 2017, 7:50:22 AM8/4/17
to
Hi,

I wanted to use tcl and twapi to delete folders, except there are opened files in.

I searched in the twapi documentation and didn't find related functionality.

Did I miss something?

I have installed twapi 4.1.27.

BTW: teapot only serves twapi 3.0.x, why?

Best regards,

Martin

Ashok

unread,
Aug 6, 2017, 1:00:29 PM8/6/17
to
Not sure whether you mean you want to find the open files in the current
process or open files in *any* process. Although I suspect the answer is
no in both cases :-)

twapi 1.0 used to be able to retrieve all open file paths for any
process, but that was removed because it used to use some undocumented
calls that would cause hangs in some cases. The documented method
requires a driver to be loaded which is not something worth doing in
terms of support costs.

/Ashok

MartinLemburg@Siemens-PLM

unread,
Aug 7, 2017, 10:06:07 AM8/7/17
to
Hi Ashok,

Thanks for your response!

My use case is to get all open files related to a folder.

So I thought about asking the system for currently open files or all process for opened files (like SysInternal tools can do (Process Explorer|Monitor|Files Monitor|handle (console application)).

The other comp.lang.tcl topic about memory consumption in enumerating all processes collecting information about, was a kind of test in getting all processes to be (later) able to ask them for open files.

In my problem to be solved I need to delete a folder, depending on having no open files inside.
Eventually I should use a BATch file and SysInternals "handle" console application.
So you won't need to bother about extending twapi for one requesting user.

Best regards,

Martin
0 new messages