c++结构体delphi改写

typedef struct iodbtgi {
short s_grp; /* start group number */
short dummy; /* dummy */
short e_grp; /* end group number */
struct {
long n_tool; /* number of tool */
long count_value; /* tool life */
long counter; /* tool life counter */
long count_type; /* tool life counter type */
} data[5];
} IODBTGI; /* In case that the number of group is 5 */

各位大师上面的c结构体,怎麼样改写为成delphi的record啊
谢谢啦
extern "C" __declspec(dllexport)
IODBTGI * WINAPI GetTime(const char *ipaddress);

这是我c中dll的函数申明

在delphi中我要申明一个返回机构体指针的函数 应该怎麼写啊

Function GetTimeList(ip:string):^IODBTGI;

这样写编译出错啊(Identifier expected but '^' found)

type
TIodbtgiData = packed record
n_tool : LongInt; //* number of tool */
count_value : LongInt; //* tool life */
counter : LongInt; //* tool life counter */
count_type : LongInt; //* tool life counter type */
end;

PIodbtgi = ^TIodbtgi;
TIodbtgi = packed record
s_grp : Word; //* start group number */
dummy : Word; //* dummy */
e_grp : Word; //* end group number */
data : array [0..4] of TIodbtgiData;
end;

var
IODBTGI : TIodbtgi;

//------------------------------------------------------------

function GetTimeList(ip : string): PIodbtgi;
温馨提示:答案为网友推荐,仅供参考
第1个回答  2010-06-26
type
TStruct = Record
case Integer of
0:(data:array[0..3] of LongInt);
1:(
n_tool:LongInt;
count_value :LongInt;
counter:LongInt;
count_type:Longint;
)
end;

type
iodbtgi = packed Record
s_grp :Word;
dummy :Word;
e_grp :Word;
Struct:TStruct;
end;