重构
This commit is contained in:
1 parent
384aade1a8
commit
bfe5b0ee12
82 files changed
+11652
-3978
No files matched your search
@@ -0,0 +1,38 @@
|
||||
#include "pch.h"
|
||||
#include "global_context.h"
|
||||
#include "http_server.h"
|
||||
#include "easylogging++.h"
|
||||
#include "hooks.h"
|
||||
|
||||
|
||||
namespace wxhelper {
|
||||
|
||||
void GlobalContext::initialize(HMODULE module) {
|
||||
module_ = module;
|
||||
DWORD base = Utils::GetWeChatWinBase();
|
||||
config.emplace();
|
||||
log.emplace();
|
||||
log->initialize();
|
||||
hide_module.emplace();
|
||||
#ifndef _DEBUG
|
||||
hide_module->Hide(module_);
|
||||
#endif
|
||||
|
||||
HttpServer::GetInstance().Init(19088);
|
||||
HttpServer::GetInstance().HttpStart();
|
||||
DB::GetInstance().init(base);
|
||||
contact_mgr.emplace(ContactMgr{base});
|
||||
misc_mgr.emplace(MiscMgr{base});
|
||||
send_mgr.emplace(SendMessageMgr{base});
|
||||
account_mgr.emplace(AccountMgr{base});
|
||||
chat_room_mgr.emplace(ChatRoomMgr{base});
|
||||
sns_mgr.emplace(SNSMgr{base});
|
||||
}
|
||||
|
||||
void GlobalContext::finally() {
|
||||
HttpServer::GetInstance().HttpClose();
|
||||
hooks::UnHookLog();
|
||||
hooks::UnHookRecvMsg();
|
||||
hooks::UnHookSearchContact();
|
||||
}
|
||||
} // namespace wxhelper
|
||||
Reference in new issue
Block a user