typedef struct
{
char  name[20];    
char  sex;
unsigned int age;            
}struct1那个是vc中的定义,由于在delphi中也传这样的结构体数据给vc写的dll,那个结构体,在delphi中怎么定义呢?

解决方案 »

  1.   


      struct1 = record
        name : array [0..19] of Char;
        sex : Char;
        age : Word;
      end;
      

  2.   

      struct1 = record
        name : array [0..19] of Char;
        sex : Char;
        age : LongWord;
      end;
      

  3.   

    age那个在delphi中到底用什么类型呀?vc提供的dll函数,我在delphi中怎么定义呢?
    int sendstruct1(char *ip,struct1 *mnu)另外,vc定义的结构体,转成delphi的结构体,原则是什么?
    遵循 在vc和delphi每个定义的成员所占的字节数必须相等么?是遵循这个原则么???
      

  4.   

    按2楼的,用LongWord
    Longword 0..4294967295 unsigned 32-bit