给定foo.dll中的以下c++类classa{private:int_answer;public:a(intanswer){_answer=answer;}__declspec(dllexport)intGetAnswer(){return_answer;}}我想要来自C#的pInvokeGetAnswer。为此,我使用以下方法:[DllImport("foo.dll",CallingConvention=CallingConvention.ThisCall,EntryPoint="something")]publicstaticexternintGetAnswer(IntPtrth