int compare_turn = fSize/sizeof(TSoundTag)-1-64;
结构体:
typedef struct
{
short mValue[13];
unsigned short eValue;
short _dummy[2];//填充字节,保证结构按照32字节对齐
} TSoundTag;

解决方案 »

  1.   

    type TSoundTag
        mValue(12) as integer
        eValue as integer
        dummy(1) as integer     '照原样翻译,VC中的内存对齐默认是字对齐,VB中是字节对齐
    end typedim TSoundTag as sTag      '为了取得结构长度,定义这个变量
    dim compare_turn as long
    compare_turn = fSize / len(sTag) - 1 - 64
      

  2.   

    The memory representation of the structure depends on the compiler setting, so this is an open-end question.