char[] buf = new char[4];
解决方案 »
- 今天下班前老板发话了,要作个客户资料影像查询系统,影像单独保存还要存进数据库中?
- socket 文件传输优化问题 高手进来帮忙啊!周公看到请进!(200分)
- 木马在RAR文件里也会有效吗?
- C#中我有一个界面,界面上有一个pictureBox控件,我想把这个控件上的图片存到数据库
- 文件上传的问题
- 求和问题
- 这次做了个WinForm的项目,遇到困难了:关于Image字段如何显示在pictureBox控件呢啊?
- C#如何使用openGL
- 简单问题
- 如何打印DataGrid 中内容((win form))
- 求助:如何触发或实现windowform的datagrid邦定的checkbox或textbox的事件或方法?
- iis 安全认证中的passport谁使用过? 如何设置? 摘要式身份验证 是怎么原理 ?
假如在c语言做的一个动态链接库中有一个
函数struct a * somefunc(void)在c#中调用这个函数,
在c#中如何取出somefunc的值,找到char buf[]中的值?
因为在c#中char []buf =new char[4];buf的地址是不固定的
而在c语言中,buf 的地址是确定的 = a的地址 - 4;
public struct a
{
[MarshalAs( UnmanagedType.ByValArray, SizeConst=4)]
public char[] buf;
public int a;
}a a1 = somefunc(void)
public struct a
{
[MarshalAs( UnmanagedType.ByValArray, SizeConst=4)]
public char[] buf;
public int a;
}a a1 = somefunc(void)