0

任务将回调 typeof System::Func 传递给非托管函数。

   //c++ clr

        class Unmanagement
        {
          void Test()
          {
            Marshal::GetDelegateForFunctionPointer(callback,);//<----how to specify the type?
          }
          IntPtr callback;
        }

        bool Init(Func<IntPtr, Int32, Int32,Int32>^ callback)
        {
          Unmanagement a=new Unmanagement;
          IntPtr cb=Marshal::GetFunctionPointerForDelegate(callback);
          a->callback=cb;
        }
4

1 回答 1

1

Func<IntPtr, Int32, Int32, Int32>::typeid?

于 2013-03-20T07:46:49.887 回答