source: pacpusframework/trunk/include/Pacpus/PacpusTools/Win32ShMem.h@ 11

Last change on this file since 11 was 3, checked in by sgosseli, 12 years ago
  • Add the existing Pacpus files from pacpusdev and pacpuscore.
  • Provide a clean build system based on multiple CMake files.
File size: 949 bytes
Line 
1/// ********************************************************************
2/// @date created 2006/12/30 - 17:31
3/// @author Gerald Dherbomez
4/// @version $Id: Win32ShMem.h 930 2012-03-28 08:30:14Z kurdejma $
5/// *********************************************************************
6
7#ifndef WIN32SHMEM_H
8#define WIN32SHMEM_H
9
10#include "ShMemBase.h"
11
12typedef void * HANDLE;
13
14class Win32ShMem
15 : public ShMemBase
16{
17public:
18 Win32ShMem(const char * name, int size);
19 ~Win32ShMem();
20
21 virtual bool wait(unsigned long timeout = 0);
22 virtual void * read();
23 virtual void read(void * mem, int size);
24 virtual void write(void * data, int size, unsigned long offset = 0);
25 virtual void lockMemory();
26 virtual void unlockMemory();
27 virtual void * getEventIdentifier();
28
29protected:
30
31private:
32 HANDLE semaphore_;
33 HANDLE shMemHandle_;
34 HANDLE event_;
35};
36
37#endif // WIN32SHMEM_H
Note: See TracBrowser for help on using the repository browser.