Files
aixianling 5c9f1dae4a init
2025-01-09 17:45:40 +08:00

30 lines
825 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef _CODE_PATCH_SETUP_H_
#define _CODE_PATCH_SETUP_H_
/************************************************************************/
/*
/* 运行时函数代码补丁安装库
/*
/*
/* 函数代码补丁的实现原理为在原始代码位置写入跳转指令跳转到新的函数位置。期间用到内存
/* 页属性更改函数VirtualProtect。
/*
/************************************************************************/
#ifdef __cplusplus
extern "C"{
#endif
/*
* Comments: 应用代码补丁
* Param void * dest: 补丁后代码的执行位置
* Param void * src: 要打补丁的代码位置
* @Return int: 返回0表示应用代码补丁成功否则返回值表示系统错误码
*/
int patchFunction(void *dest, void *src);
#ifdef __cplusplus
};
#endif
#endif _CODE_PATCH_SETUP_H_