i injecting .net spylib in target address space using remote invocation. need send message window's thread created remote process via getwindowthreadprocessid
.
i working on windows 7. unfortunately returns 0 of time. gives appropriate thread id (after restarting windows).
why getting strange behavior getwindowthreadprocessid
?
the msdn documentation getwindowthreadprocessid has community content section, in ddeben has answered questions 2 years before asked question. :)
getwindowthreadprocessid returns 0 , variable pointed lpdwprocessid not modifed if handle hwnd not valid. getlasterror() returns 87 (error_invalid_parameter).
in future might remember getlasterror()
function need go in win32 api when have failure states unsure of. msdn give link it, if not, can't hurt check out. however, aware in managed code getlasterror()
requires special treatment or end bogus results end confusing you.
Comments
Post a Comment