我正在绕过弯路。
我正在尝试检测是否从我的另一个函数中调用了该函数
我的returnAdd都是不同的,我希望它们是相同的。
bool Get(LPDIRECT3DDEVICE9 pDevice)
{
bool bRet = false;
IDirect3DSurface9* backBuf;
if (SUCCEEDED(pDevice->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &backBuf))) {
if (SUCCEEDED(pDevice->GetRenderTargetData(backBuf, pSurface)))
{
DWORD returnAdd = (DWORD)GetAddressOfThisFunction();
bRet = true;
}
}
backBuf->Release();
return bRet;
}
HRESULT __stdcall GetRenderTargetData(LPDIRECT3DDEVICE9 pDevice, IDirect3DSurface9* pRenderTarget, IDirect3DSurface9* pDestSurface)
{
DWORD returnAdd = (DWORD)_ReturnAddress();
return oGetRenderTargetData(pDevice, pRenderTarget, pDestSurface);
}