class CA(ctypes.Structure):
    _fields_ = [('key', ctypes.POINTER(ctypes.c_wchar_p)), ('values',
        ctypes.POINTER(ctypes.c_float)), ('title', ctypes.POINTER(ctypes.
        c_wchar_p)), ('index', ctypes.c_int)]
CAArray = CA * 2
ca_array = CAArray()
for ca, key in zip(ca_array, tmp):
    ca.key = ctypes.pointer(ctypes.c_wchar_p(key))
ca.values = ctypes.pointer(ctypes.c_float(tmp[key][0]))
ca.title = ctypes.pointer(ctypes.c_wchar_p(tmp[key][2]))
ca.index = tmp[key][3]
for ca in ca_array:
    pass
Converting Python dictionary to ctypes structure