I have a ctypes wrapper around an internal library. One of the structures in use has a field called "data" of type POINTER(c_char). This is used to hold the payload of the message (not necessarily a null terminated string). This payload always has an 8 byte header that I would like to skip over. How do you do this in Python with ctypes?
class MyStruct(Structure): _fields_ = [("len", c_size_t), ("data", POINTER(c_char))] def my_cb_proc(msg): # want to skip first 8 bytes -- below does not work tmp = (POINTER(c_char)).from_address(addressof(msg.contents.data)+8) do_something(tmp)