I want to hook all windows that create in main thread of a remote process.
I create process with CreateProcess API and get id of its main thread, but to capture all windows, process created in suspend mode (CREATE_SUSPENDED).
I don?t know why SetWindowHookEx return error if dwThreadId of its parameter was suspended thread.
How could I Hook all window in remote process?
*(I don?t want install Global hook by set dwThreadId to zero)
*I call SetWindowHookEx with idHook=WH_CBT
*My Hook procedure exist in dll
*My program work correctly when thread has not suspended