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

B

BB

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,176
Messages
2,570,950
Members
47,503
Latest member
supremedee

Latest Threads

Top