怎么把C++中的char**转换成c#里面的string数组
解决方案 »
- 打印机清空色带和清空纸张操作
- C#把一个值插入到listview指定的某一列 怎么做?
- 如何写一个在每个盘符下面写一个文本文件的方法?
- 关于Activator.CreateInstance(Type type)的疑问
- C# Winform问题
- 一个更新数据库表的问题---在线等待
- 问一下大家,有没有一种类似于freetextbox的,在winform中用的输入界面?
- 请问大家,得到Edit框文字内容的WindowsAPI是什么啊??(在线等……)
- HttpContext.Current.Request.Form.Get(key) == null
- C# 得分的大好时机,怎样发布
- 超简单送分问题,怎么取小数前几位
- WriteableBitmap存为PNG格式的图片?
用System.Text.ASCIIEncoding.ASCII.GetString可以吗?
有没有demo啊?
{
List<string> retList = new List<string>();
while (true)
{
IntPtr address = (IntPtr)Marshal.PtrToStructure(p, typeof(IntPtr));
if (address == IntPtr.Zero)
break;
string sz = Marshal.PtrToStringAnsi(address);
retList.Add(sz);
p = (IntPtr)((Int32)p + 4);
}
return retList.ToArray();
}以上示例以NULL收尾的char**如果定长的,把while (true)改为for(int i=0;i<nLength,i++)即可