1.公共语言运行库支持(/clr)
2.C/C++->常规->运行时库->多线程调试DLL (/MDd)
3.stdafx.h头部添加 #define _AFXDLL
4.复制dll到项目内或者资源内,添加:#using "netpay.dll"
5.使用方法:
char* MerId = "232552"; char* OrdId="201022332222"; char* TransAmt="666600"; char* TransDate="20110115";
char* TransType="0001";
netpay::NetPay ^np = gcnew netpay::NetPay();
System::String ^logId = np->startPayment(gcnew System::String(MerId),gcnew System::String(OrdId), gcnew System::String(TransAmt), gcnew System::String(TransDate), gcnew System::String(TransType));
return 0;
C++调用托管C#代码设置(vs2008)
最新推荐文章于 2020-07-15 15:35:17 发布