整个文件有两部分构成文件头和文件的正文部分
文件头结构体和正文部分结构体如下:
typedef struct {
//文件的头结构 CHAR    FrameNM[30];       // file name (Frame name)
 DWORD   FileSize;          // Maxmum bytes in file
 DWORD   StartSeek;         // Begining address in bytes
 DWORD   RecSize;           // Size of record in bytes
 DWORD   RecSum;            // records sum in database
 time_t   StartTM;           // start time
 time_t   EndTM;              // end time
 time_t   Step;              // time delta
 UINT     FirstRec;          // First record
 UINT     LastRec;          // Last record
 HANDLE     Fp;                // File Handle
 BOOL     SaveBack; UINT     FieldSum;          // field sum in file
 UINT     Field[MAXFIELD];   // field message
} DBFRAME;正文的文件结构体:typedef struct {
 float TIR102; 
    float TIR103; 
    float TIR104;  
    float TIR105; 
    float TIR106;  
    float TIR107; 
    float TIR108; 
    float PIR104; 
    float TIR109;   
    float TIR111;      
    float PIR105;      
    float LIA101;      
    float LIA102;      
    float PIR107;      
    float TIR115;      
    float PIR110;      
    float PIR113;      
    float TIR121;      
    float TIR122;      
    float TIR123;     
    float TIR124;      
    float TIR125;      
    float TIR126;      
    float PIRC120;     
    float PIRC121;     
    float LIRC106;     
    float LIRC107;     
    float TIR133;     
} REC_DEHYDRATE1;
大哥帮忙给写一个对应的VB里面的结构体好不好
谢谢啊 

解决方案 »

  1.   

    dbf文件我很少用到,文件结构体倒是可写如下(C中float在VB中可定义为single或double,看需要)
    文件结构体:
    type
        dim TIR102 as single 
        dim TIR103 as single 
        dim TIR104 as single  
        dim TIR105 as single 
        dim TIR106 as single  
        dim TIR107 as single 
        dim TIR108 as single 
        dim PIR104 as single 
        dim TIR109 as single   
        dim TIR111 as single      
        dim PIR105 as single      
        dim LIA101 as single      
        dim LIA102 as single      
        dim PIR107 as single      
        dim TIR115 as single      
        dim PIR110 as single      
        dim PIR113 as single      
        dim TIR121 as single      
        dim TIR122 as single      
        dim TIR123 as single     
        dim TIR124 as single      
        dim TIR125 as single      
        dim TIR126 as single      
        dim PIRC120 as single     
        dim PIRC121 as single     
        dim LIRC106 as single     
        dim LIRC107 as single     
        dim TIR133 as single     
    end type
      

  2.   

    CHAR:    String
     DWORD:   Long
     time_t:  Date
     BOOL:    Boolean只知道这四种。float:double或者single
      

  3.   

    其他的好说,就是handle处理不了
      

  4.   

    CHAR == Byte
    DWORD == Long
    UINT == Long
    HANDLE == Long
    BOOL == Long
    time_t == Long
      

  5.   

    其实我也觉得 BOOL 是 Boolean ,不过 SDK 的头文件里明明写着:
    typedef int BOOL;
    其实差不多