Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2005

Tip: Looking for answers? Try searching our database.

Which process has a file open

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
George - 18 Mar 2005 15:19 GMT
Is there a windows API call which will tell me which process has a file open?
David Lowndes - 19 Mar 2005 10:09 GMT
>Is there a windows API call which will tell me which process has a file open?

George,

As far as I know there's no simple API call to do this. If you want a
utility that will do it, have a look at the excellent Process Explorer
tool at www.sysinternals.com

Dave
Signature

MVP VC++ FAQ: http://www.mvps.org/vcfaq

George Grimes - 19 Mar 2005 23:17 GMT
> >Is there a windows API call which will tell me which process has a file open?
>
[quoted text clipped - 5 lines]
>
> Dave
Thanks,  That will get me what I need.

George
Michael Nemtsev - 22 Mar 2005 11:26 GMT
Hello David,

>> Is there a windows API call which will tell me which process has a
>> file open?

> As far as I know there's no simple API call to do this. If you want a
> utility that will do it, have a look at the excellent Process Explorer
> tool at www.sysinternals.com

It's not that hard. See explanations and examples there
http://www.codeguru.com/Cpp/W-P/system/processesmodules/article.php/c2827/
http://www.codeguru.com/Cpp/W-P/files/fileio/article.php/c1287/
David Lowndes - 22 Mar 2005 11:35 GMT
>It's not that hard.

It can't be that straightforward either when that article contains a
warning like this:

"This software uses a few undocumented functions (ntdll.dll), peeks
around in your systems internals. Use at your own risk! It works for
me".

:)

Dave
Willy Denoyette [MVP] - 22 Mar 2005 23:23 GMT
> >It's not that hard.
>
[quoted text clipped - 8 lines]
>
> Dave

Which are the same internal API's used by sysinternals Process Explorer :-)

Willy.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.