C#调用C++DLL,OUT问题.
C#
[DllImport(@"Request.dll", EntryPoint = "SendRequest", CharSet=CharSet.Auto)]
public static extern int SendRequest(bool ispost, String httpurl, StringBuilder sHeaderSend, StringBuilder sHeaderReceive, StringBuilder sMessage);
string t = SendRequest(false, "http://www.baidu.com", sb1, sb2, sb3).ToString();
C++
TESTCPPDLL_API int __stdcall SendRequest(bool IsPost, LPCSTR url2, OUT LPSTR psHeaderSend,OUT LPSTR psHeaderReceive,OUT LPSTR psMessage)
{
psHeaderSend= req.headerSend; //req是一个结构
}
C#里面的sb1,sb2,sb3.都是空,但在C++里面对应的变更都有值,请问C++里面如何使用OUT