[python-win32] Calling random Windows function?

Tim Golden mail at timgolden.me.uk
Fri Oct 23 09:48:58 CEST 2009


Aahz wrote:
> I'm just getting into Windows programming for the first time, and I need
> to list all open files.  Windows has a convenient function for that
> (NtQuerySystemInformation), but I can't figure out how I am supposed to
> call it.  I bought of copy of the Win32 book and I can't find anything
> about accessing random API calls;
> ctypes.windll.kernel32.NtQuerySystemInformation gives an AttributeError.
> 
> Where should I be looking to figure this out?

To answer your question slightly obliquely, can I offer you:

http://winsys.googlecode.com/svn/trunk/random/file_handles.py

which is, I think, coming close to what you want and will at
least illustrate the way of doing it. AFAICT you don't need
a Google sign-in or Javascript to access that code, but if 
you have any problems -- philosophical or technical -- let me
know and I can email you a copy directly.

TJG


More information about the python-win32 mailing list