typedef struct tagPfile Pfile;
typedef struct tagConItem ConItem;
struct ListItem
{
char  *strName[5];
char  StrValue[512];
ConfigItem *configItem;
};
struct tagConItem 
{
char name[512];
char *label[5]
ListItem *listItems;  //上面定义的结构体
Pfile *profile;
};struct tagPfile
{
char name[512];
int langCount;
char *langName[5];
int type;
ConItem *configItems;
};C++ Builder 调用原型
int DLL_CALLTYPE praseXmlFile(char *FilePath,Pfile *profile); 可以用
如何用Delphi 调用
我定义的类型对应为
char  StrValue[512]=============StrValue:arrayp[1..512] of char;
char *label[5] 这种不知如何对应
我试了很久  一直报错

解决方案 »

  1.   

    char *label[5]   应该是   label: array[0..5] of pchar;吧
      

  2.   

    char *label[5] 
    试试这样
    array [1..5] of pchar;
      

  3.   

    TempChar5=array[0..512] of char;
      ArrayChar=array[0..5] of TempChar5;
      ArrayChrP=^ArrayChar;
    我这样对应的  能读出数据来  但是还是会报错
      

  4.   

    typedef struct PlayTitleInfo 
    {
    int titleId;
    double duration;
    ChapterInfo *chapterInfos;
    }PlayTitleInfo;typedef struct PlayerHandle{
    int (*playerHandle)(struct PlayingReport *playingReport);
    } PlayerHandle;这种怎么调用的   函数指针的
      

  5.   

    现在不报错了  但是数据不完整
    struct tagPfile
    {
    char name[512];
    int langCount;
    char *langName[5];
    int type;
    ConItem *configItems;
    };
    中的这个  ConItem *configItems;   
    在D中应该定义为  一个结构体 tagConItem 的数组吧? 但是是不定长的
    这个在D中怎么处理
      

  6.   

    configItems : array of ConItem;在调用前要   setLength(tagPfile.configItems,Len);