求教C#调用C++DLL没有加extern "C"修饰的函数
C++头文件如下:
class IQuoteApi{public: //API函数 virtual bool __cdecl Open(TAddressField& addr) = 0; virtual void __cdecl Close() = 0; virtual bool __cdecl IsOpen() = 0;};extern "C"{ //认证函数 认证码 针对每个开发商 一个 bool __cdecl CertApi(TCertInfoType cert, TLogPathType path);} [DllImport("Api.Dll", CallingConvention = CallingConvention.Cdecl)] public static extern bool CertApi(string cert,string path); [DllImport("Api.Dll", CallingConvention = CallingConvention.Cdecl)] public static extern int Close(); bool certInfo; certInfo = CertApi("sdfsasfwer", "asdfdf"); int c; c = Close();class IQuoteApi{public: //API函数 virtual bool __cdecl Open(TAddressField& addr) = 0; virtual void __cdecl Close() = 0; virtual bool __cdecl IsOpen() = 0;};