关于C#调用C++DLL的问题,请高手帮忙解决一下
/**
* 调用ws函数
* wsdlURL ws的url地址
* inxml 入参,传入的ws xml消息
* outxml 出参,传出的ws xml消息
**/
extern "C" _declspec(dllexport) int _stdcall invokeWS(char* wsdlURL, char* inxml, char* outxml);
DLL文件函数型
outxml为指针变量
我在C#中用以下调用方法
[DllImport("C:\\Windows\\System32\\csi_ws.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
private static extern int invokeWS( string wsdlURL, string inxml, ref string outxml);
运行时提示
尝试读取或写入受保护的内存。这通常指示其他内存已损坏。
请问应该怎才能正确调用呢?
谢谢!