typedef struct
{
    unsigned char Effect;
    unsigned char Level;     
    unsigned char Speed;
    unsigned char Delay;

    unsigned char Font;
    unsigned char ShowTitle;
    unsigned char TitleColor;
    unsigned char WordColor;
} TFileParam;这个是C的DLL里面的结构体,我现在用DELPHI调用,请问这个结构体该怎么写?我的写法是
  FileParam=record
    effect:Byte;
    level:Byte;
    Speed:Byte;
    Delay:Byte;
    Font:Byte;
    ShowTitle:Byte;
    TitleColor:Byte;
    WordColor:Byte;
  end;
  TFileParam=FileParam;
  PFileParam=^FileParam;
请教

解决方案 »

  1.   

    type
      TFileParam = record 
        effect:char; 
        level:char; 
        Speed:char; 
        Delay:char; 
        Font:char; 
        ShowTitle:char; 
        TitleColor:char; 
        WordColor:char; 
      end;  
      

  2.   

    unsigned char在Delphi中可以以byte或者Pchar代替,另外你的结构体貌似没加type
      

  3.   


     TFileParam = record 
        effect: Byte; 
        level: Byte; 
        Speed: Byte; 
        Delay: Byte; 
        Font: Byte; 
        ShowTitle: Byte; 
        TitleColor: Byte; 
        WordColor: Byte; 
      end; 
      PFileParam = ^TFileParam;