473,396 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Looking for some API hints on finding process' open files.

This isn't related to C# directly, but probably more of a Win32 API
question. It's going to get wrapped in a larger .NET system, but the calls
I want probably aren't in .NET. In either case, I need to write a utility
to find out what process has a filehandle open.

Yes, there are many, many 3rd party tools for doing this. I don't want a
3rd party tool, I'm willing to re-invent this wheel. None of these tools
have source code.

What I need is a hint. Where in the Win32 API can I find out what processes
have which filehandles? I can get process handles, but I can't seem to go
that extra setp to find out what they've got open.

I'v researched this online quite a bit, and I'm just a small leap away from
the answer I think. A small hint, please.

Nov 16 '05 #1
1 1329
Win32: No method exists to do what you want
NT Native API: use the ZwQuerySystemInformation service, with
service-class = SystemHandleInformation

An example of this function is in the "Native API Reference" by
Gary Nebbett, although there will be lots of examples on the net as well

James

www.catch22.net
Free win32 software, sourcecode and tutorials
-----
Please de-spam my email address before replying.
"Clinton Pierce" <cp*****@payroll1.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
This isn't related to C# directly, but probably more of a Win32 API
question. It's going to get wrapped in a larger .NET system, but the
calls
I want probably aren't in .NET. In either case, I need to write a utility
to find out what process has a filehandle open.

Yes, there are many, many 3rd party tools for doing this. I don't want a
3rd party tool, I'm willing to re-invent this wheel. None of these tools
have source code.

What I need is a hint. Where in the Win32 API can I find out what
processes
have which filehandles? I can get process handles, but I can't seem to go
that extra setp to find out what they've got open.

I'v researched this online quite a bit, and I'm just a small leap away
from
the answer I think. A small hint, please.

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mike | last post by:
Hello, I'm looking to create a PHP script that will automatically generate an index/menu/list (whatever) based on the PDF files that are within a particular directory. I would like the script...
4
by: Alexander DEJANOVSKI | last post by:
Hi all, I'm starting a new project to develop an Open-Source EAI server in Python and I'm looking for motivated developpers and testers. It is inspired by Open Adaptor (www.openadaptor.org), but...
3
by: fdsl ysnh | last post by:
--- python-list-request@python.orgдµÀ: > Send Python-list mailing list submissions to > python-list@python.org > > To subscribe or unsubscribe via the World Wide Web, > visit >...
14
by: Matt | last post by:
Any progammers looking for a killer app to develop? How about a voice enabled forum? One of the most powerful, exciting, and engrossing experiences on the Internet is the Forum. The first great...
7
by: kamkwokho | last post by:
Could any answer following questions as many as you can. ii) Write a C shell script convertmin which will read in a number, thought of as representing minutes, and print out the number of...
193
by: Michael B. | last post by:
I was just thinking about this, specifically wondering if there's any features that the C specification currently lacks, and which may be included in some future standardization. Of course, I...
8
by: Cider123 | last post by:
I ran into a situation where my Window Service had to process 100,000+ files, when I first noticed I needed to tweak various routines. Everything runs fine, but here's what I ran into: In the...
1
by: me | last post by:
Hi, Im having a few issues with finding exactly which program may be accessing a certain file. Lets say I need to replace a DLL with a newer version, but I need to make sure its not being...
1
by: avik1612 | last post by:
Hi, I have created a program to find text files in a particular directory or folder. and to find a particular word in that files i finding it difficult to put the list in an array and finding...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.