Marko29
Marko29

Reputation: 1005

How to get post-call parameters of hooked winapi function?

For this example i am talking about hooking BeginPaint() which i hooked fine and i can normally access everything pre-call...

HDC WINAPI Mine_BeginPaint(HWND hWnd, LPPAINTSTRUCT lpPaint)
{


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

    return fpBeginPaint(hWnd, lpPaint);


}

I am looking for a way to inspect this lpPaint struct post-call, how could i do this?

Upvotes: 2

Views: 210

Answers (1)

SigTerm
SigTerm

Reputation: 26429

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

Upvotes: 2

Related Questions