就像WinRAR中的虚拟文件功能,  是怎样做的?
例如运行一个Setup.exe程序, 其他与安装有关的文件都能识别和解压。
望高手们指点,   不胜感激。

解决方案 »

  1.   

    我觉得WinRAR是把文件解压到一个临时目录中的
      

  2.   

    CMemFile is the CFile-derived class that supports memory files. These memory files behave like disk files, except that the file is stored in RAM rather than on disk. A memory file is useful for fast temporary storage, or for transferring raw bytes or serialized objects between independent processes.At a Glance
    Header file: Afx.h 
    Platforms:   
    Versions:  2.0 and later 
    Complete documentation Visual C++ documentation CMemFile Member Functions
    Construction 
    CMemFile Constructs a memory file object. Operations 
    Attach Attaches a block of memory to CMemFile. 
    Detach Detaches the block of memory from CMemFile and returns a pointer to the block of memory detached. Advanced Overridables 
    Alloc Override to modify memory allocation behavior. 
    Free Override to modify memory deallocation behavior. 
    Realloc Override to modify memory reallocation behavior. 
    Memcpy Override to modify memory copy behavior when reading and writing files. 
    GrowFile Override to modify behavior when growing a file. **************************************************
    CMemFile是一种可以以文件读写的形式将数据保存在内存中的方法!你可以查一查相关资料