How to call functions in Advapi32.dll using ctypes

Serge Orlov Serge.Orlov at gmail.com
Fri Apr 7 21:41:40 EDT 2006


Podi wrote:
> I have ctypes version 0.9.6 and Python 2.4.2 running on Windows XP
> Professional.
>
> When I tried to use some functions in the Advapi32.dll, some functions
> are available and some are not. Is this a bug or feature by design?

Most likely feature by design. What you see in documentation for C
library is not what your C code will actually use. For example when you
write errno in C (that looks like global variable access) it is
actually a call to __thread_safe_errno() function.

Have you tried calling InitiateSystemShutdownA mentioned in the
documentation?




More information about the Python-list mailing list