home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 275 / DPCS0111DVD.ISO / Toolkit / Audio-Visual / VirtualDub / Source / VirtualDub-1.9.10-src.7z / src / h / vd2 / VDLib / win32 / FileMapping.h < prev   
Encoding:
C/C++ Source or Header  |  2009-09-14  |  838 b   |  41 lines

  1. #ifndef f_VD2_VDLIB_WIN32_FILEMAPPING_H
  2. #define f_VD2_VDLIB_WIN32_FILEMAPPING_H
  3.  
  4. #ifdef _MSC_VER
  5.     #pragma once
  6. #endif
  7.  
  8. class VDFileMappingW32 {
  9.     VDFileMappingW32(const VDFileMappingW32&);
  10.     VDFileMappingW32& operator=(const VDFileMappingW32&);
  11. public:
  12.     VDFileMappingW32();
  13.     ~VDFileMappingW32();
  14.  
  15.     bool Init(uint32 bytes);
  16.     void Shutdown();
  17.  
  18.     void *GetHandle() const { return mpHandle; }
  19.  
  20. protected:
  21.     void    *mpHandle;
  22. };
  23.  
  24. class VDFileMappingViewW32 {
  25.     VDFileMappingViewW32(const VDFileMappingViewW32&);
  26.     VDFileMappingViewW32& operator=(const VDFileMappingViewW32&);
  27. public:
  28.     VDFileMappingViewW32();
  29.     ~VDFileMappingViewW32();
  30.  
  31.     bool Init(const VDFileMappingW32& mapping, uint64 offset, uint32 size);
  32.     void Shutdown();
  33.  
  34.     void *GetPointer() const { return mpView; }
  35.  
  36. protected:
  37.     void *mpView;
  38. };
  39.  
  40. #endif
  41.