ctypes, error when calling function

Max M maxm at mxm.dk
Thu Oct 7 16:17:50 CEST 2004

Richie Hindle wrote:
> [Max]
>>caps = MIDIOUTCAPS()
>>print winmm.midiOutGetDevCapsA(deviceID, caps, sizeof(caps))
>>ValueError: Procedure probably called with too many arguments (60 bytes 
>>in excess)
> You need to pass byref(caps) rather than caps.  The API expects a
> pointer to the structure, not the structure itself.

Thanks. Yes I figured it out about the same time i read your reply.

I guess it's been about 15 years since I have last coded in c, :-s so 
I'm a bit rusty.


hilsen/regards Max M, Denmark

IT's Mad Science

More information about the Python-list mailing list