_asm { add ebp,4 mov eax,[ebp] sub ebp,4 mov callerAdress,eax } #define CALLER_ADDRESS_STDCALL(x) / _asm mov eax,[ebp+4] _asm mov x,eax; 同事写的函数式的,这个比较好用 void* __stdcall getCall() { void *res; __asm { mov eax,[ebp] mov eax,[eax+4]; mov res,eax } return res; }