If you are running 32-bit 3.6 on Windows, please test this

eryk sun eryksun at gmail.com
Fri Sep 1 18:20:29 EDT 2017


On Fri, Sep 1, 2017 at 2:24 AM, Pavol Lisy <pavol.lisy at gmail.com> wrote:
>
> I was trying to call sqrt using ctypes from msvcrt but I am not succesful:
>
> import ctypes
> msc = ctypes.windll.msvcrt

msvcrt.dll is private to Windows components. It's not intended for
applications. See my previous post in this thread for the correct
shared library to load for Python 3.5+.

Also, WinDLL (or windll) is for stdcall, whereas CRT functions use
cdecl (CDLL or cdll). In 64-bit it isn't a problem since cdecl and
stdcall are the same in x64, but this will fail in 32-bit x86.



More information about the Python-list mailing list