I'm a python developer and I want to call the freetype6.dll with the ctypes package. In all my programs I use that package for call the .dll, without any problem, but with freetype, I found some problems at the first function, FT_Init_FreeType, because ctypes say me (windows say to ctypes that say to me) that FT_Init_FreeType no need any parameter, so if I pass it the library struct, I receive an error: ValueError: Procedure probably called with too many arguments (4 bytes in excess).
In my experience, this problem appeare when I call a function that has less arguments than I pass. I try also to linux system (with the /usr/lib/libfreetype.so) and here, with the same code, it work well.
Can some one help me?
Thanks,
Michele
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm not sure to understand your question, but I if understand right, your are saing me that FT_Init_FreeType has no parameters, but FT_Init_FreeType must be called with one parameter, a pointer to a FT_library.
I'm a python developer and I want to call the freetype6.dll with the ctypes package. In all my programs I use that package for call the .dll, without any problem, but with freetype, I found some problems at the first function, FT_Init_FreeType, because ctypes say me (windows say to ctypes that say to me) that FT_Init_FreeType no need any parameter, so if I pass it the library struct, I receive an error: ValueError: Procedure probably called with too many arguments (4 bytes in excess).
In my experience, this problem appeare when I call a function that has less arguments than I pass. I try also to linux system (with the /usr/lib/libfreetype.so) and here, with the same code, it work well.
Can some one help me?
Thanks,
Michele
Why do you pass excess parameters to a function? In other words: what's the point in passing a parameter to FT_Init_FreeType when it has none?
I'm not sure to understand your question, but I if understand right, your are saing me that FT_Init_FreeType has no parameters, but FT_Init_FreeType must be called with one parameter, a pointer to a FT_library.
http://freetype.sourceforge.net/freetype2/docs/reference/ft2-base_interface.html#FT_Init_FreeType
Thanks,
Michele