Yep, that will give you an AttributeError...

You want to be looking in "ntdll", not kernel32.

eg. ctypes.windll.ntdll.NtQuerySystemInformation

But that's only to get you partway there.  Next you'll need to
implement the SYSTEM_INFORMATION_CLASS structures, to provide as
parameters.

MSDN has some info on this function:
http://msdn.microsoft.com/en-us/library/ms724509(VS.85).aspx

But, wow... Just starting with windows programming, and jumping right
into the semi-documented territory.  Brave. :)


2009/10/23 Aahz <[email protected]>:
> 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?
> --
> Aahz ([email protected])           <*>         http://www.pythoncraft.com/
>
> Member of the Groucho Marx Fan Club
> _______________________________________________
> python-win32 mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/python-win32
>
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to