I\'m using ctypes and I\'ve defined this struct in order to pass parameters
class my_struct(ctypes.Structure):
_fields_ = [ (\"buffer\", ctypes.c_char * BUFS
I think you need to send a pointer to a C string in your my_struct, and not a C string directly, because C strings are null-terminated. Try to do it like this:
import ctypes
BUFSIZE = 10
class my_struct(ctypes.Structure):
_fields_ = [ ("buffer", ctypes.POINTER(ctypes.c_char)),
("size", ctypes.c_int )]
cstr = (ctypes.c_char * BUFSIZE)()
proto = my_struct(cstr)