c# 托管对象与InPtr互转
时间:2014-11-27 21:56:15
收藏:0
阅读:1262
GCHandle thisHandle = GCHandle.Alloc(this);//this 是 MyClass类型 IntPtr thisptr = GCHandle.ToIntPtr(thisHandle); GCHandle thisHandle = GCHandle.FromIntPtr(thisptr ); MyClass thisObject = (MyClass)thisHandle.Target;
原文:http://www.cnblogs.com/uucode/p/4127117.html
评论(0)