[Pythonmac-SIG] calldll MAXARGS
Georges Martin
georges.martin@ping.be
Fri, 26 Nov 1999 17:10:38 +0100
On 26/11/99 at 16:44, jack@oratrix.nl (Jack Jansen) wrote:
> > I am currently trying to use calldll, but I ran into an annoying limitation:
> > calldll.newcall() only accepts 8 arguments for the C function.
[...]
> At the very least you'll also have to change the various initializers for
> stackvariables (like c_arg in cdc_call() and argconv in cdll_newcall()), and
> of course the call of (*func) in cdc_call().
Grumpf... I missed this "call of (*func) in cdc_call()". I will try.
> But I'm surprised that there are toolbox calls that have more than 8
> arguments. What is the maximum number you have come across?
> --
> Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++
> Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
> www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm
This one comes from TextCommon.h:
"""
EXTERN_API_C( OSStatus )
GetTextEncodingName (TextEncoding iEncoding,
TextEncodingNameSelector iNamePartSelector,
RegionCode iPreferredRegion,
TextEncoding iPreferredEncoding,
ByteCount iOutputBufLen,
ByteCount * oNameLength,
RegionCode * oActualRegion, /* can be NULL */
TextEncoding * oActualEncoding, /* can be NULL */
TextPtr oEncodingName);
"""
GetTextEncodingName = calldll.newcall(\
TC.GetTextEncodingName, 'Long', \
'InLong', 'InLong', 'InShort', 'InLong', 'InByte', \
'OutByte', 'OutShort', 'OutLong', 'OutPstring'\
)
Thanks,
Georges Martin