gpt4 book ai didi

c++ - 获取 C++ 函数的 "size"(长度)?

转载 作者:太空狗 更新时间:2023-10-29 19:40:51 27 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
How to get the length of a function in bytes?

我正在制作一个 Hooking 程序,用于将方法插入指定的内存部分。

我需要获取本地 C++ 函数的长度,我已经使用强制转换来获取函数的位置,但如何获取长度?

int GetFuncLen()
{
int i = 0;
while((DWORD*)Function+i<max)
{
if((DWORD*)Function+i==0xC3)
{
return i;
}
i++;
}
}

工作?

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com