24小时热门版块排行榜    

CyRhmU.jpeg
查看: 948  |  回复: 0

snaker

金虫 (小有名气)

[求助] 在public中声明一个外部可调用函数,其参数类型是自定义的,在哪定义这个类型呢

unit BootMain;
interface
uses
  {此处省略}

type
  {此处省略}
  private
    { Private declarations }
  public
    { Public declarations }
    type TVCI_CAN_OBJ = record
       ID : integer;        
       TimeStamp: integer;     
       TimeFlag: byte;         
       SendType:BYTE ;      
       RemoteFlag: BYTE;     
       ExternFlag: BYTE;      
       DataLen: BYTE;      
       Data: array[0..7] of Byte;
       Reserved:array[0..2] of Byte;
    end;
  pVCI_CAN_OBJ=^TVCI_CAN_OBJ;   

  function FD_Transmit(DevType:dword;DevIndex:dword; CANindex:dword;  psend:pVCI_CAN_OBJ;len:integer):integer ;stdcall;
  external 'CANApplication.dll'; //返回实际发送的帧数
end;

在另外一个unit中调用函数FD_Transmit,参数有一个是自定义的类型pVCI_CAN_OBJ,
这样写就报错:[ERROR]‘END’ expected but 'TYPE' found
                        [ERROR]'IMPLEMENTATION' expected but ';' found
                        [ERROR]'.' expected but 'IMPLEMENTATION' found
不知道如何解决,请各位指教!
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

智能机器人

Robot (super robot)

我们都爱小木虫

相关版块跳转 我要订阅楼主 snaker 的主题更新
信息提示
请填处理意见