WxMgr.cpp 448 B

1234567891011121314151617181920212223242526272829
  1. #include "stdafx.h"
  2. #include "WxMgr.h"
  3. #include "Global.h"
  4. CWxMgr::CWxMgr()
  5. {
  6. }
  7. CWxMgr::~CWxMgr()
  8. {
  9. }
  10. BOOL CWxMgr::AttachUnMgrWxProc()
  11. {
  12. vector<DWORD> vtWxProcId = FindAllProcess(WECHAT);
  13. for ( DWORD pid:vtWxProcId)
  14. {
  15. if ( m_mapWx.count(pid) == 0)
  16. {
  17. CWxObject wxObj(pid, g_szDynamicLibraryPath);
  18. wxObj.InjectDynamicLibrary();
  19. wxObj.FindWxMainWnd();
  20. m_mapWx.insert(pair<DWORD, CWxObject>(pid, wxObj));
  21. }
  22. }
  23. return TRUE;
  24. }