typedef struct _ALL_
{
int m_nInt;
float m_fFloat;
BYTE m_WaveBuffer[4096]; //定义wav文件的大小
BYTE m_BMPBuffer[16384]; //定义Bitmap文件的大小
}SAll;void func()
{
...
   SAll sa;
   memcpy(sa.m_WaveBuffer,(BYTE*)pWav,4096);
   ...
   FILE* fp
   fp=fopen()
   fwrite((char*)&sa,1,sizeof(SAll),fp);
   fclose(fp);
...
}

解决方案 »

  1.   

    按照这种方法,如果我分别存入了多个BMP和WAV文件,如何定位到第2,3,或第n个 BMP 或WAV上,并能知道该文件尾
      

  2.   

    你可以考虑用复合文档的结构,但是需要对ole比较熟悉,文档位置如下:
    MSDN library
    +platform sdk documentation
    ++component services
    +++COM
    ++++Structured Storage 
    +++++Structured Storage Reference
    ++++++IStorage
    +++++++IStorage-Compound File Implementation(如果数据比较大的话,可能需要测试一下运行速度和内存使用情况)email:nec211218#yahoo.com