C#代码: [DllImport("duxie.dll", EntryPoint = "lala", CharSet = CharSet.None)]
public static extern string lala(); private void button1_Click(object sender, RoutedEventArgs e)
{
string a = lala();//////////此处报错
}
错误为:Attempted to read or write protected memory. This is often an indication that other memory is corrupt另外,dll本身的返回值是char*我是新手,希望大家多多指教,最好详细一点,我会多加分的,急啊!!!
public static extern string lala(); private void button1_Click(object sender, RoutedEventArgs e)
{
string a = lala();//////////此处报错
}
错误为:Attempted to read or write protected memory. This is often an indication that other memory is corrupt另外,dll本身的返回值是char*我是新手,希望大家多多指教,最好详细一点,我会多加分的,急啊!!!
解决方案 »
- 单独安装.NET3.0或3.5的时候速度很慢?
- 急:远程获取服务器上web文件信息
- 自己写的web服务器程序,请求帮助!
- 按钮图标 C#
- vista下可以用VS.NET2003吗?
- WebForm 中如何设置使得执行完按钮btn1单击事件后自动的执行btn2单击事件?
- 读取Excel文件如何判断Cell是被隐藏和被合并了???
- 请问.NET有类似线程池的解决线程排队(new Thread)问题的组件么?
- 为什么页面刷新也会触发maxBtn_Click事件,请问怎么解决
- C#中关于WinForm的两个问题100分求救!!
- winform中textbox执行了keyPress事件后
- 求助!!c#怎样获取DataGridView控件中当前选中行的值
char [] ch=lala();
或
char ch=lala();lala()返回的值在栈上,不在堆上!