Passing pointer parameters to a C++ function call from a pythin script

BB myaskingquestions at yahoo.com
Mon Feb 9 12:40:36 EST 2004


I am calling my C++ function (in a DLL) from a python script as
follows:
_dllcall('add','ll','l',(var1,var2))

This works fine if the 2 parameters accepted by the function are
normal "long" type.

If the function expects a pointer type parameter then the same way of
passing the parameter doesn't work. For example if the C++ function
expects a "long *" and I am calling it as:
_dllcall('multiply','l','l',(var1))

then in this case it fails.

Can anybody point out what could be the culprit :-)

What I understood from some python documention that I saw was that
python internally treats all parameters as passed by reference.



More information about the Python-list mailing list