#ifndef __WX_OBJECT__ #define __WX_OBJECT__ #pragma once //#include "Injection.h" class CWxObject { public: CWxObject(); explicit CWxObject(DWORD dwProcId, LPCTSTR lpDynamicLibraryPath); ~CWxObject(); protected: // 进程id; DWORD m_dwWxProcId; // 进程句柄; HANDLE m_hWxProcess; // 进程窗口句柄; HWND m_hWxWnd; // 动态库路径; TCHAR m_szDllPath[MAX_PATH]; // 路径分配的内存; LPVOID m_lpInjectData; LPVOID m_lpEjectData; // 路径长度; DWORD m_dwPathLen; // 注入线程句柄; HANDLE m_hInjectThread; // 卸载线程句柄; HANDLE m_hEjectThread; public: inline DWORD GetProcId() { return m_dwWxProcId; }; // dll路径和要注入的进程id; void setInjectionObj(DWORD dwProcId, LPCTSTR lpDynamicLibraryPath); BOOL InjectDynamicLibrary(); BOOL EjectDynamicLibrary(); BOOL FindWxWnd(); static int CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam); }; #endif //__WX_OBJECT__