467,113 Members | 1,368 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,113 developers. It's quick & easy.

ctypes - swig - pointer

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
Jun 30 '08 #1
  • viewed: 889
Share:

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

19 posts views Thread by Thomas Heller | last post: by
2 posts views Thread by ajikoe@gmail.com | last post: by
1 post views Thread by marc.wyburn@googlemail.com | last post: by
6 posts views Thread by Jack | last post: by
8 posts views Thread by gianluca | last post: by
2 posts views Thread by Jean-Paul Calderone | last post: by
2 posts views Thread by Sells, Fred | last post: by
reply views Thread by Terry Reedy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.