home *** CD-ROM | disk | FTP | other *** search
/ Windows Graphics Programming / Feng_Yuan_Win32_GDI_DirectX.iso / Samples / include / mmfile.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-12  |  1.4 KB  |  34 lines

  1. #pragma once
  2.  
  3. //-----------------------------------------------------------------------------------//
  4. //              Windows Graphics Programming: Win32 GDI and DirectDraw               //
  5. //                             ISBN  0-13-086985-6                                   //
  6. //                                                                                   //
  7. //  Written            by  Yuan, Feng                             www.fengyuan.com   //
  8. //  Copyright (c) 2000 by  Hewlett-Packard Company                www.hp.com         //
  9. //  Published          by  Prentice Hall PTR, Prentice-Hall, Inc. www.phptr.com      //
  10. //                                                                                   //
  11. //  FileName   : mmfile.h                                                            //
  12. //  Description: Memory-mapped file                                                  //
  13. //  Version    : 1.00.000, May 31, 2000                                              //
  14. //-----------------------------------------------------------------------------------//
  15.  
  16. class KMemoryMappedFile
  17. {
  18.     HANDLE                m_hFile;
  19.     HANDLE                m_hMapping;
  20.  
  21. public:
  22.     const unsigned char * m_View;
  23.  
  24.     KMemoryMappedFile()
  25.     {
  26.         m_hFile    = INVALID_HANDLE_VALUE;
  27.         m_hMapping = NULL;
  28.         m_View     = NULL;
  29.     }
  30.  
  31.     ~KMemoryMappedFile();
  32.     bool Open(LPCTSTR szFileName);
  33. };
  34.