C#托管问题
工具:VS2010  .net4.0
c#代码:
      public delegate void GetMethod(intptr ip1, intptr ip2);
      [SecuritySafeCritical]
      static public Test GetC++Data(intptr ip)
      {
         GetMethod mydll = new GetMethod (GetData);
         SetData(intptr ip, mydll);
         ....
       }
       SetData(intptr ip, GetMethod mydll)
       {
       }
       [DLLImport("CPP.dll")]
       GetData(intptr ip, intptr ipData);
C++代码:
        GetData(A *a, B *b)
        {
        }
先在c#代码调不了c++ 中GetData()函数(mydll返回的地址为空),请问是什么原因?如何修改?
谢谢!
------解决方案--------------------
你的A和B是C++类型,也需要在C#这边声明,你把它贴出来。。。
------解决方案--------------------
A和B是C++定义的,你在C#这边也要声明!