这样的vc的结构体定义,怎么在delphi中定义
typedef struct
{
char name[20];
char sex;
unsigned int age;
}struct1
那个是vc中的定义,由于在delphi中也传这样的结构体数据给vc写的dll,那个结构体,在delphi中怎么定义呢?
Delphi(Pascal) code:
struct1 = record
name : array [0..19] of Char;
sex : Char;
age : Word;
end;
struct1 = record
name : array [0..19] of Char;
sex : Char;
age : LongWord;
end;
age那个在delphi中到底用什么类型呀?
vc提供的dll函数,我在delphi中怎么定义呢?
int sendstruct1(char *ip,struct1 *mnu)
另外,vc定义的结构体,转成delphi的结构体,原则是什么?
遵循 在vc和delphi每个定义的成员所占的字节数必须相等么?是遵循这个原则么???
按2楼的,用LongWord
Longword 0..4294967295 unsigned 32-bit
相关问答:
已知Python 中:
s = unicode("测试", "gb2312")
s = u'\u6d4b\u8bd5'
print s
测试
在Delphi里面如何将\u6d4b\u8bd5这样的还原成Gb2312的汉字呢?
找到个方法
......
这个是拦截按键消息并测试是否为ENTER键。
begin
case wParam of
WM_KEYDOWN:
fEatKeystroke := (p.vkCode = VK_RETURN);
& ......
我写了个小程序,上面添加了一个shockwaveflash控件,然后在movie里写入swf文件的路径,然后执行没有问题。
当我把这个程序转移到另一台电脑执行时, shockwaveflash 控件显示空白。也就是没有加载那个swf文件。 ......
我先用idhttp 的get方法访问一个网站,网站返回了一段cookie,当我 调用 idhttp post方法的时候,我如何把服务器返回的这段cookies带上 ,先谢谢各位了
读取 HTTP Response Header
里面有 Set-Cookies 域 ......