cShare.h
1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2001
*
*****************************************************************************/
/*******************************************************************************
* Filename:
* ---------
* cShare.h
*
* Project:
* --------
* Catcher
*
* Description:
* ------------
* This module contains the definitions for cShare.cpp
*
* Author:
* -------
* -------
*
*==============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
* removed!
* removed!
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*==============================================================================
*******************************************************************************/
#ifndef CSHARE_MEM_H
#define CSHARE_MEM_H
#pragma warning (disable:4786)
#include <windows.h>
class CShare
{
private:
HANDLE Data_Written[2];
HANDLE Data_Read[2];
HANDLE m_hMap;
char *m_pSharedData;
int m_size;
public:
CShare();
~CShare();
bool CreateShare(const char* ID, const int &size);
void DestroyShare();
int Write(const void *data, const int &size);
int Read(void *data, const int &size);
void Stop();
};
#endif