今天又碰到传递std::string参数给另外一个DLL中的函数, 并从该函数中返回std::string的问题。参数传递进去后就不对了,返回值也不对(是空)。网上查了查,大致说,不要在DLL间传递STL数据类型,包括std::string,以及MFC CString。
但是传递 char * 也太繁琐了点。目前不知有什么好办法。
见下面的文章:
调用其他DLL时传递vector和string的问题
http://bbs.csdn.net/topics/370217758
今天又碰到传递std::string参数给另外一个DLL中的函数, 并从该函数中返回std::string的问题。参数传递进去后就不对了,返回值也不对(是空)。网上查了查,大致说,不要在DLL间传递STL数据类型,包括std::string,以及MFC CString。
但是传递 char * 也太繁琐了点。目前不知有什么好办法。
见下面的文章:
调用其他DLL时传递vector和string的问题
http://bbs.csdn.net/topics/370217758