2012-04-08 23 views
2

對於這個例子我談論掛鉤調用BeginPaint(),我迷上很好,我可以正常地訪問所有呼叫前...如何獲得hooked winapi函數的通話後參數?

HDC WINAPI Mine_BeginPaint(HWND hWnd, LPPAINTSTRUCT lpPaint) 
{ 


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

    return fpBeginPaint(hWnd, lpPaint); 


} 

我正在尋找一種方式來檢查這個lpPaint結構調用後,我怎麼能這樣做?

回答

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; 
}