Sorry, but it failed again. I tried c_void_p in python, and fun(vtkPolyData* ptr) and fun(void* ptr) in c++.
This is the error code:
OSError: exception: access violation reading 0xFFFFFFFFFFFFFFFF
Logs before crash:
_0000022506c9c470_p_vtkPolyData
python logs: addr : 0000022506C9C470
C++ logs: 0000022506C9C470->0000022506C9C470
According to the logs, the c++ get the same ptr as python, but when I call it, it crashes.