calling loaded DLL function expecting POINT * argument

Tim Roberts timr at probo.com
Sun Aug 26 21:23:49 EDT 2012


Tim Williams <tjandacw at cox.net> wrote:

>Hello all,
>
>I'm trying to use the ctypes module to call functions in a DLL. I've
>figured out how to modify my path so the library is found, and I can 
>call LoadLibrary on it, but one of the functions expects an array of
> POINTS. Here is the prototype from the .h file:
>
>
>TRACKER_API HRESULT InitializeMask(HANDLE pHandle, int nWidth, int nHeight, POINT* ptMasks, int nNumPoints);

How is TRACKER_API defined?  You're using ctypes.oledll, which uses the
__stdcall calling convention.  It's possible your DLL is defined as
__cdecl.  Try cdll.LoadLibrary instead of oledll.LoadLibrary.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list