[MetaHook] GameUI hook
Hook GameUI function.
#include <metahook.h> #include <IGameUI.h> IGameUI *g_pGameUI = ; void (__fastcall *g_pfnCGameUI_Initialize)(void *pthis, int edx, CreateInterfaceFn *factories, int count) = ;
void (__fastcall *g_pfnCGameUI_Start)(void *pthis, int edx, struct cl_enginefuncs_s *engineFuncs, int interfaceVersion, void *system) = ;
void (__fastcall *g_pfnCGameUI_Shutdown)(void *pthis, int edx) = ;
int (__fastcall *g_pfnCGameUI_ActivateGameUI)(void *pthis, int edx) = ;
int (__fastcall *g_pfnCGameUI_ActivateDemoUI)(void *pthis, int edx) = ;
int (__fastcall *g_pfnCGameUI_HasExclusiveInput)(void *pthis, int edx) = ;
void (__fastcall *g_pfnCGameUI_RunFrame)(void *pthis, int edx) = ;
void (__fastcall *g_pfnCGameUI_ConnectToServer)(void *pthis, int edx, const char *game, int IP, int port) = ;
void (__fastcall *g_pfnCGameUI_DisconnectFromServer)(void *pthis, int edx) = ;
void (__fastcall *g_pfnCGameUI_HideGameUI)(void *pthis, int edx) = ;
bool (__fastcall *g_pfnCGameUI_IsGameUIActive)(void *pthis, int edx) = ;
void (__fastcall *g_pfnCGameUI_LoadingStarted)(void *pthis, int edx, const char *resourceType, const char *resourceName) = ;
void (__fastcall *g_pfnCGameUI_LoadingFinished)(void *pthis, int edx, const char *resourceType, const char *resourceName) = ;
void (__fastcall *g_pfnCGameUI_StartProgressBar)(void *pthis, int edx, const char *progressType, int progressSteps) = ;
int (__fastcall *g_pfnCGameUI_ContinueProgressBar)(void *pthis, int edx, int progressPoint, float progressFraction) = ;
void (__fastcall *g_pfnCGameUI_StopProgressBar)(void *pthis, int edx, bool bError, const char *failureReason, const char *extendedReason) = ;
int (__fastcall *g_pfnCGameUI_SetProgressBarStatusText)(void *pthis, int edx, const char *statusText) = ;
void (__fastcall *g_pfnCGameUI_SetSecondaryProgressBar)(void *pthis, int edx, float progress) = ;
void (__fastcall *g_pfnCGameUI_SetSecondaryProgressBarText)(void *pthis, int edx, const char *statusText) = ; class CGameUI : public IGameUI
{
public:
void Initialize(CreateInterfaceFn *factories, int count);
void Start(struct cl_enginefuncs_s *engineFuncs, int interfaceVersion, void *system);
void Shutdown(void);
int ActivateGameUI(void);
int ActivateDemoUI(void);
int HasExclusiveInput(void);
void RunFrame(void);
void ConnectToServer(const char *game, int IP, int port);
void DisconnectFromServer(void);
void HideGameUI(void);
bool IsGameUIActive(void);
void LoadingStarted(const char *resourceType, const char *resourceName);
void LoadingFinished(const char *resourceType, const char *resourceName);
void StartProgressBar(const char *progressType, int progressSteps);
int ContinueProgressBar(int progressPoint, float progressFraction);
void StopProgressBar(bool bError, const char *failureReason, const char *extendedReason = NULL);
int SetProgressBarStatusText(const char *statusText);
void SetSecondaryProgressBar(float progress);
void SetSecondaryProgressBarText(const char *statusText);
}; void CGameUI::Initialize(CreateInterfaceFn *factories, int count)
{
return g_pfnCGameUI_Initialize(this, , factories, count);
} void CGameUI::Start(struct cl_enginefuncs_s *engineFuncs, int interfaceVersion, void *system)
{
return g_pfnCGameUI_Start(this, , engineFuncs, interfaceVersion, system);
} void CGameUI::Shutdown(void)
{
return g_pfnCGameUI_Shutdown(this, );
} int CGameUI::ActivateGameUI(void)
{
return g_pfnCGameUI_ActivateGameUI(this, );
} int CGameUI::ActivateDemoUI(void)
{
return g_pfnCGameUI_ActivateDemoUI(this, );
} int CGameUI::HasExclusiveInput(void)
{
return g_pfnCGameUI_HasExclusiveInput(this, );
} void CGameUI::RunFrame(void)
{
return g_pfnCGameUI_RunFrame(this, );
} void CGameUI::ConnectToServer(const char *game, int IP, int port)
{
return g_pfnCGameUI_ConnectToServer(this, , game, IP, port);
} void CGameUI::DisconnectFromServer(void)
{
return g_pfnCGameUI_DisconnectFromServer(this, );
} void CGameUI::HideGameUI(void)
{
return g_pfnCGameUI_HideGameUI(this, );
} bool CGameUI::IsGameUIActive(void)
{
return g_pfnCGameUI_IsGameUIActive(this, );
} void CGameUI::LoadingStarted(const char *resourceType, const char *resourceName)
{
return g_pfnCGameUI_LoadingStarted(this, , resourceType, resourceName);
} void CGameUI::LoadingFinished(const char *resourceType, const char *resourceName)
{
return g_pfnCGameUI_LoadingFinished(this, , resourceType, resourceName);
} void CGameUI::StartProgressBar(const char *progressType, int progressSteps)
{
return g_pfnCGameUI_StartProgressBar(this, , progressType, progressSteps);
} int CGameUI::ContinueProgressBar(int progressPoint, float progressFraction)
{
return g_pfnCGameUI_ContinueProgressBar(this, , progressPoint, progressFraction);
} void CGameUI::StopProgressBar(bool bError, const char *failureReason, const char *extendedReason)
{
return g_pfnCGameUI_StopProgressBar(this, , bError, failureReason, extendedReason);
} int CGameUI::SetProgressBarStatusText(const char *statusText)
{
return g_pfnCGameUI_SetProgressBarStatusText(this, , statusText);
} void CGameUI::SetSecondaryProgressBar(float progress)
{
return g_pfnCGameUI_SetSecondaryProgressBar(this, , progress);
} void CGameUI::SetSecondaryProgressBarText(const char *statusText)
{
return g_pfnCGameUI_SetSecondaryProgressBarText(this, , statusText);
} void GameUI_InstallHook(void)
{
CreateInterfaceFn GameUICreateInterface = Sys_GetFactory((HINTERFACEMODULE)GetModuleHandleA("GameUI.dll"));
g_pGameUI = (IGameUI *)GameUICreateInterface(GAMEUI_INTERFACE_VERSION, ); CGameUI GameUI;
DWORD *pVFTable = *(DWORD **)&GameUI; g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[ ], (void *&)g_pfnCGameUI_Initialize);
g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[ ], (void *&)g_pfnCGameUI_Start);
g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[ ], (void *&)g_pfnCGameUI_Shutdown);
g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[ ], (void *&)g_pfnCGameUI_ActivateGameUI);
g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[ ], (void *&)g_pfnCGameUI_ActivateDemoUI);
g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[ ], (void *&)g_pfnCGameUI_HasExclusiveInput);
g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[ ], (void *&)g_pfnCGameUI_RunFrame);
g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[ ], (void *&)g_pfnCGameUI_ConnectToServer);
g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[ ], (void *&)g_pfnCGameUI_DisconnectFromServer);
g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[], (void *&)g_pfnCGameUI_HideGameUI);
g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[], (void *&)g_pfnCGameUI_IsGameUIActive);
g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[], (void *&)g_pfnCGameUI_LoadingStarted);
g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[], (void *&)g_pfnCGameUI_LoadingFinished);
g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[], (void *&)g_pfnCGameUI_StartProgressBar);
g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[], (void *&)g_pfnCGameUI_ContinueProgressBar);
g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[], (void *&)g_pfnCGameUI_StopProgressBar);
g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[], (void *&)g_pfnCGameUI_SetProgressBarStatusText);
g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[], (void *&)g_pfnCGameUI_SetSecondaryProgressBar);
g_pMetaHookAPI->VFTHook(g_pGameUI, , , (void *)pVFTable[], (void *&)g_pfnCGameUI_SetSecondaryProgressBarText);
}
[MetaHook] GameUI hook的更多相关文章
- [MetaHook] BaseUI hook
Hook IBaseUI function. #include <metahook.h> #include <IBaseUI.h> IBaseUI *g_pBaseUI = ; ...
- [MetaHook] Surface hook
Hook ISurface function. #include <metahook.h> #include <vgui/ISurface.h> using namespace ...
- [MetaHook] Event Hook
#include <metahook.h> struct event_hook_t { event_hook_t *next; char *name; void (*pfnEvent)(e ...
- [MetaHook] Load large texture from model
We need hook "GL_LoadTexture" engine function. GL_LOADTEXTURE_SIG from hw.dll(3266) engine ...
- svnserver hook python
在使用中可能会遇到的错误排除 :1.Error: svn: 解析"D:\www\test"出错,或svn: E020024: Error resolving case of 'D: ...
- Android Hook技术
原文:http://blog.csdn.net/u011068702/article/details/53208825 附:Android Hook 全面入侵监听器 第一步.先爆项目demo照片,代码 ...
- Frida HOOK微信实现骰子作弊
由于微信摇骰子的功能在本地进行随机后在发送,所以存在可以hook掉判断骰子数的方法进行修改作弊. 1.frida实现hook java层函数1)写个用来测试的demo,当我们点击按钮的时候会弹出窗口显 ...
- java的关闭钩子(Shutdown Hook)
Runtime.getRuntime().addShutdownHook(shutdownHook); 这个方法的含义说明: 这个方法的意思就是在jvm中增加一个关闭的钩子,当jv ...
- IDT HOOK思路整理
IDT(中断描述符表)分为IRQ(真正的硬件中断)和软件中断(又叫异常). HOOK的思路为,替换键盘中断处理的函数地址为自己的函数地址.这样在键盘驱动和过滤驱动之前就可以截获键盘输入. 思路确定之后 ...
随机推荐
- JavaScript(五)——插入地图
代码: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3. ...
- iOS获取本地沙盒视频封面图片
最近做了个小应用,有涉及到本地视频播放及列表显示. 其中一个知识点就是获取本地存储视频,用来界面中的封面显示. 记录如下: -(UIImage*) thumbnailImageForVideo:(NS ...
- proteus 运行出错,用户名不可使用中文!
仿真的时候提示如图提示 cannot open ’c\user\小名\AppData\local\temp\LISA0089.sdf’ 系统用户名不能是中文! 解决办法:重新建立个账户,记得用英文命名 ...
- Linux 下从头再走 GTK+-3.0 (二)
仅仅创建一个空白窗口是不够的,下面我们为创建的窗口添加一个按钮. 以 Hello,World!为例. 首先创建一个源文件:example2.c 内容如下. #include <gtk/gtk.h ...
- 准备使用 Office 365 中国版--域名
无论是购买还是试用Office 365,每个Office 365用户都会有一个唯一的ID.在中国版的Office 365中,这个ID是一个以“.partner.onmschina.cn”结尾的域名.既 ...
- 有时候就是看不进论文-jQuery动画特效篇&MySQL
hi 早上知道新的乱斗模式后,没忍住开了几把,然后就无心论文了...用这个来破吧 1.jQuery -----动画特效----- ----调用show()和hide()方法显示和隐藏元素 show() ...
- TeamTalk源码分析之服务端描述
TTServer(TeamTalk服务器端)主要包含了以下几种服务器: LoginServer (C++): 登录服务器,分配一个负载小的MsgServer给客户端使用 MsgServer (C++) ...
- Qt基础之开发环境部署
将 Qt 5.6 集成至 VS2015 摘要: 由于VS2015不再支持addin,所以要用其他手段. 这里给出64位系统下的安装步骤,32位类似. 一.安装VS2015 过程略.值得注意的是要选择需 ...
- Codevs1378选课[树形DP|两种做法(多叉转二叉|树形DP+分组背包)---(▼皿▼#)----^___^]
题目描述 Description 学校实行学分制.每门的必修课都有固定的学分,同时还必须获得相应的选修课程学分.学校开设了N(N<300)门的选修课程,每个学生可选课程的数量M是给定的.学生选修 ...
- NOIP水题合集[3/未完待续]
NOIP2008pj传球游戏 题目描述 上体育课的时候,小蛮的老师经常带着同学们一起做游戏.这次,老师带着同学们一起做传球游戏. 游戏规则是这样的:n个同学站成一个圆圈,其中的一个同学手里拿着一个球, ...