如何获取挂钩winapi函数的调用后参数?

时间:2012-04-08 02:39:00

标签: c++ windows winapi

对于这个例子,我正在谈论挂钩BeginPaint(),我很好地挂钩,我可以正常访问所有呼叫前...

HDC WINAPI Mine_BeginPaint(HWND hWnd, LPPAINTSTRUCT lpPaint)
{


   // do stuff here, inspecting PRE-CALL lppaint struct etc...

    return fpBeginPaint(hWnd, lpPaint);


}

我正在寻找一种方法来检查这个lpPaint struct post-call,我该怎么做?

1 个答案:

答案 0 :(得分:2)

HDC WINAPI Mine_BeginPaint(HWND hWnd, LPPAINTSTRUCT lpPaint){
    // do stuff here, inspecting PRE-CALL lppaint struct etc...
    HDC result = fpBeginPaint(hWnd, lpPaint);
    //inspect here whatever you want.
    return result;
}