how to get files opened by a process

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Nick N (NickN_at_discussions.microsoft.com)
Date: 09/16/04


Date: Thu, 16 Sep 2004 01:43:10 -0700

Hi,
I have a difficulties with finding a way to see, what files a process keeps
opened. I'm using C#.
For example if you track "winword" process, I want to see if it keeps open a
file "c:\my documents\test.doc".
I read about WMI, but could not find a solution with it. I saw some tools of
www.sysinternals.com, like "handle" and "process explorer", which are doing
such monitoring.
Can you please help me?