-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLowLevelDLLFunction.h
More file actions
58 lines (45 loc) · 1.15 KB
/
Copy pathLowLevelDLLFunction.h
File metadata and controls
58 lines (45 loc) · 1.15 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
//---------------------------------------------------------------------------
#ifndef LowLevelDLLFunctionH
#define LowLevelDLLFunctionH
#include "HighLevelDLLFunction.h"
namespace CallDLLInterface
{
class LowLevelDLLFunction
{
public:
HANDLE handle;
FARPROC farproc;
//*Constructors
LowLevelDLLFunction() : handle(NULL), farproc(NULL)
{
}
LowLevelDLLFunction(HANDLE h, FARPROC f)
: handle(h), farproc(f)
{
}
LowLevelDLLFunction(HANDLE h, const char* function)
: handle(h)
{
if (h != NULL)
{
farproc = GetProcAddress(h, function);
}
else farproc = NULL;
}
/**
LowLevelDLLFunction(HighLevelDLLFunction* highDLLfunc)
{
(*this) = highDLLfunc->toLowLevel();
}
**/
//*Overloaded
LowLevelDLLFunction & operator=(const LowLevelDLLFunction &rhs)
{
handle = rhs.handle;
farproc = rhs.farproc;
return (*this);
}
};
}; //end namespace
//---------------------------------------------------------------------------
#endif