Returning struct from c++ dll to Python
问题 I'm trying to return structure so I can use it in Python. I am beginner programmer so please explain me what am I doing wrong. I've succeeded to return simple ctypes earlier (bool, unsigned int) but struct is too complicated for me. This is what I have: DLLAPI.h #define DLLAPI extern "C" __declspec(dllexport) ... DLLAPI myStruct* DLLApiGetStruct(); DLLAPI.cpp EDIT1: instead of TString, struct members type is wchar_t* now, but error I get is the same ... typedef struct myStruct{ wchar_t* id;