sip, capturo el valor del handle con un hook en TranslateMessage. Además lo he comprobado con el InmunityDBG y siempre funciona
Código [Seleccionar]
BOOL WINAPI fake_TranslateMessage(const MSG *lpMsg) {
if (lpMsg->message == WM_CHAR) {
h_main_window = lpMsg->hwnd;
}
return orig_TranslateMessage(lpMsg);
}