calling loaded DLL function expecting POINT * argument

Tim Williams tjandacw at cox.net
Tue Sep 4 08:16:32 EDT 2012


On Sunday, August 26, 2012 9:23:49 PM UTC-4, Tim Roberts wrote:
> 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.

Thanks for the reply. I've been out all last week. I'll give it a try.



More information about the Python-list mailing list