4 #include "../DCHook/DCHook.h"
7 class THookLoader : public THookDllI {
9 THookLoader(const char *dllname);
11 virtual bool Load(HWND hwnd);
12 virtual void Unload();
13 virtual bool IsLoaded()
14 { return hDll!=NULL; }
16 virtual bool Init(HWND hwnd);
17 virtual void Uninit();
18 virtual int Config( int clickonly, int keyaction, int keyflag )
19 { return DCHConfig(clickonly, keyaction, keyflag); }
20 virtual int Config2( struct TDCHConfig *cfg )
21 { return DCHConfig2(cfg); }
22 virtual int Capture();
23 virtual int CaptureAsync();
24 virtual int CaptureAsyncWait();
36 static DWORD WINAPI cbWaitCaptureThread(LPVOID This);
37 void WaitCaptureThread();
43 FNDCHUninit DCHUninit;
44 FNDCHConfig DCHConfig;
45 FNDCHConfig2 DCHConfig2;
46 FNDCHCapture DCHCapture;
47 FNDCHWaitForCaptureResult DCHWaitForCaptureResult;
51 char share[ COMPSIZE ];
55 class THookLoader64 : public THookDllI {
57 THookLoader64(HWND hwnd_recv);
58 virtual ~THookLoader64();
59 virtual bool Load(HWND hwnd);
60 virtual void Unload();
61 virtual bool IsLoaded()
62 { return hProc!=NULL; }
64 virtual bool Init(HWND hwnd);
65 virtual void Uninit() ;
66 virtual int Config( int clickonly, int keyaction, int keyflag );
67 virtual int Config2( struct TDCHConfig *cfg );
68 virtual int Capture();
69 virtual int CaptureAsync();
70 virtual int CaptureAsyncWait();
72 void SetTarget(HWND hwnd)
73 { hwndTarget = hwnd; }
76 return WaitForInputIdle(hProc, 500)==0;
78 bool IsPending() const { return LoadPending; }
79 void Notify64() { LoadPending = false; }
82 int Send(int msg, void *data=NULL, int len=0);
84 HWND hwndRecv; // receive window handle (=main window handle)
85 HWND hwndTarget; // main window handle of pdhk64.exe