ctypes - swig - pointer

G

gianluca

I've a problem with dll function colled with python/ctypes. My
functions (C) requred a typedef int "value_type" in tree different
way:
same as value_type; - mydll.foo1(value_type)
same as *value_type; - mydll.foo2(*value_type)
same as **value_type; - mydll.foo3(**value_type)

How can pass it in python. If i do that:
rules=POINTER(value_type)
opr=rsl.StrengthOfRules(rules,10)
R=POINTER(rules)

I've this exception:
Traceback (most recent call last):
File "C:\temp\cRSL.py", line 49, in <module>
opr=rsl.StrengthOfRules(rules,10) #/* Creates a table of rules
strengths. */
ArgumentError: argument 1: <type 'exceptions.TypeError'>: Don't know
how to convert parameter 1

I've tried with swig (cpointer.i) olso but the library don't work
correctly and rules look empty. I need help. Could anybody give mi it?

gima
 

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

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top