各位大虾:
    您们好!我有一二进制文件用VB不知怎样打开,我有C++文件结构的信息,看的不太懂,请大虾们帮忙,谢谢!
    C++代码如下:

    文件主要分为头部和数据区两部份。头部的数据结构(使用C结构描述,所有结构都按字节对齐)如下:
typedef struct
{
    DWORD dwBeginBYTE;
        DWORD dwBYTELEN;
}
POS_INFO;

typedef struct
{
        BYTE FLAG[6];    
    BYTE DATE[8];
    unsigned short VERSION;        
    POS_INFO piDevInfo;        
    POS_INFO piTest;        
    POS_INFO piRec;        
    POS_INFO piPro;        
    POS_INFO piStepInfo;        
    POS_INFO piRtInfo;        
//    POS_INFO piHist;
//    POS_INFO piDfData;    
        POS_INFO piCamp;        
    POS_INFO piLog;            
    //POS_INFO piHistFile;
    //POS_INFO piHistCreator;
    //POS_INFO piHistBatch;
    char reverse[1968];

FILE_HEAD;

通过头部文件信息的读取,然后再获取其它信息在文件里开始位置。数据区分为下面几部份:
设备信息
typedef struct
{
    WORD wColID;
    WORD wTankID;
    BYTE dev_type;
    BYTE dev_ver;
    char unit_serial[16];
    int scale;        
    RANGE_VER1 range;
}DEVICEINFO_VER1;



typedef struct
{
    BTS_DATA_CHL        id;                INT64            test_id;        
    BTS_DATA_PROTECT    protect;        
    BTS_DATA_RECORD    record;            
    BYTE            step_id;        
    char            start_time[20];    
    char            end_time[20];    
    char            creator[15];    
    char            batch[20];        
    char            info[100];        
}TESTDATA_VER1;

工步信息
typedef struct
{    
    BYTE step_id;        //工步序号:1
    BYTE step_type;        //工步类型:1
    DWORD limit_con1;    //限制条件1:4
    DWORD limit_con2;    //限制条件2:4
    DWORD limit_con3;    //限制条件3:4
    DWORD limit_con4;    //限制条件4:4
    DWORD limit_con5;    //限制条件5:4    
}STEPINFO_VER1, *LPSTEPINFO_VER1;

typedef struct
{
    BYTE flag;  //0xFF--LOG,0x00--DA  
    int seq;            
    int cycle_id;            
    BYTE step_id;            
    BYTE step_type;        
    DWORD time;            。
    int vol;            
    int cur;            
    int ir;                
    int tmp;            
    INT64 cap;            。

    DWORD dwCRC32;
}COMPRECDATA_VER3, *LPCOMPRECDATA_VER3;