1 |
//********************************************************************************* |
2 |
// |
3 |
//Title: Terminal Services Window Clipper |
4 |
// |
5 |
//Author: Martin Wickett |
6 |
// |
7 |
//Date: 2004 |
8 |
// |
9 |
//********************************************************************************* |
10 |
|
11 |
#ifndef __CBT_H__ |
12 |
#define __CBT_H__ |
13 |
|
14 |
#include <windows.h> |
15 |
#include "hookdll.h" |
16 |
|
17 |
// |
18 |
// a wrapper class to access the WTSWinClipperdll |
19 |
// |
20 |
class WTSWinClipper |
21 |
{ |
22 |
protected: |
23 |
static HINSTANCE mCbtDllHinst; |
24 |
static SETHOOKS mSetCbtHook; |
25 |
static REMOVEHOOKS mRemoveCbtHook; |
26 |
static GETINSTANCECOUNT mGetInstanceCount; |
27 |
|
28 |
public: |
29 |
static bool Init(); |
30 |
static void Done() |
31 |
{ if (mCbtDllHinst) FreeLibrary(mCbtDllHinst); } |
32 |
|
33 |
static void SetCbtHook() |
34 |
{ if (mCbtDllHinst) mSetCbtHook(); } |
35 |
|
36 |
static void RemoveCbtHook() |
37 |
{ if (mCbtDllHinst) mRemoveCbtHook(); } |
38 |
|
39 |
static int GetInstanceCount() |
40 |
{ |
41 |
if (mCbtDllHinst) |
42 |
return mGetInstanceCount(); |
43 |
else |
44 |
return 0; |
45 |
} |
46 |
}; |
47 |
|
48 |
#endif |