C# IntPtr互转String

IntPtr init = Marshal.StringToHGlobalAnsi(textBox1.Text);

textBox2.Text = Marshal.PtrToStringAnsi(outit);

Marshal.FreeHGlobal(outit);                                 //最后释放掉

 

原文地址:http://blog.sina.com.cn/s/blog_7c5bff150100yre3.html

posted on 2016-08-11 13:35  咚..咚  阅读(2175)  评论(0)    收藏  举报

导航