Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.0 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: LgFileMap.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of MemoryFile.h
  13. //----------------------------------------------------------------------------
  14. // MapFile.h: interface for the CLgFileMap class.
  15. //
  16. //////////////////////////////////////////////////////////////////////
  17. #ifndef __MAP__FILE__H__INCLUDED__
  18. #define __MAP__FILE__H__INCLUDED__
  19. #if _MSC_VER > 1000
  20. #pragma once
  21. #endif
  22. class CLgFileMap
  23. {
  24. public:
  25. CLgFileMap();
  26. ~CLgFileMap();
  27. public:
  28. BOOL Map( LPCTSTR pName, BOOL bReadOnly = FALSE );
  29. void Unmap();
  30. LPVOID GetPointer() { return m_pMemory; }
  31. DWORD GetSize() { return m_nSize; }
  32. private:
  33. HANDLE m_hFile;
  34. HANDLE m_hMap;
  35. LPVOID m_pMemory;
  36. DWORD m_nSize;
  37. };
  38. #endif