1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #ifndef RVC_LOG_LIBSHAREMEMRY
- #define RVC_LOG_LIBSHAREMEMRY
- #ifdef _WIN32
- #include <windows.h>
- #else
- #include <sys/mman.h>
- #include <unistd.h>
- #include <fcntl.h>
- #include <semaphore.h>
- #include <time.h>
- #ifndef MAX_PATH
- #define MAX_PATH 260
- #endif // !MAX_PATH
- #ifndef INFINITE
- #define INFINITE 0xFFFFFFFF // Infinite timeout
- #endif // !INFINITE
- #endif //_WIN32
- //using namespace std ;
- class sharememory_impl4sdk; //桥接
- // 此类是从 libsharememory.dll 导出的
- class Clibsharememory4SDK
- {
- public:
- Clibsharememory4SDK(void);
- ~Clibsharememory4SDK();
- // TODO: 在此添加您的方法。
- void Unlock();
- bool IsLocked();
- void* Lock(unsigned int dwWaitTimeout=INFINITE);
- bool IsValid();
- unsigned int GetBytes();
- void Close();
- bool Open(const char* szName, unsigned int dwBytes);
- bool Create(const char* szName, unsigned int dwBytes);
- private:
- sharememory_impl4sdk*m_pImpl;
- };
- #endif
|