【发布时间】:2012-11-28 06:49:14
【问题描述】:
我已经看到了这个答案How to get function's name from function's pointer in C?。但此解决方案适用于 linux。
【问题讨论】:
我已经看到了这个答案How to get function's name from function's pointer in C?。但此解决方案适用于 linux。
【问题讨论】:
我找到了这个http://ivbel.blogspot.fr/2012/02/how-to-get-functions-name-from.html
res = SymGetSymFromAddr64(GetCurrentProcess(), addr, &dis64, pSym);
if (!res)
{
/* TODO: call your trace function instead of printf */
printf("SymGetSymFromAddr64 fails, error=%ld\n", GetLastError());
return FALSE;
}
else
{
strcpy(symbolName, pSym->Name);
}
完整的代码在链接上
【讨论】: