Leaked source code of windows server 2003
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.

54 lines
925 B

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. PassportSharedMemory.h
  5. Abstract:
  6. Shared Memory class
  7. Author:
  8. Christopher Bergh (cbergh) 10-Sept-1988
  9. Revision History:
  10. --*/
  11. #if !defined(PASSPORTSHAREDMEMORY_H)
  12. #define PASSPORTSHAREDMEMORY_H
  13. #include <windows.h>
  14. class PassportExport PassportSharedMemory
  15. {
  16. public:
  17. PassportSharedMemory();
  18. virtual ~PassportSharedMemory();
  19. BOOL CreateSharedMemory (
  20. const DWORD &dwMaximumSizeHigh,
  21. const DWORD &dwMaximunSizeLow,
  22. LPCTSTR lpcName,
  23. BOOL useMutex = TRUE);
  24. BOOL OpenSharedMemory( LPCTSTR lpcName,
  25. BOOL useMutex = TRUE);
  26. void CloseSharedMemory( void );
  27. protected:
  28. // handle and pointer for the shared memory
  29. HANDLE m_hShMem;
  30. PBYTE m_pbShMem;
  31. BOOL m_bInited;
  32. HANDLE m_hMutex;
  33. BOOL m_bUseMutex;
  34. };
  35. #endif