>I am utlizando this function so that it returns me I number it of the
>PID, but this so this returning one I number negative. What this
>making of missed? If they alguem will be able to help, I am thankful
>me.
>
>Declare INTEGER GetWindowThreadProcessId IN win32api INTEGER hwnd, INTEGER @lpdwProcessId
>
>test_thread_id = GetWindowThreadProcessId(test_hwnd, @test_pid)
>where
>
>since ja I am thankful
Gilciel,
Try using bitor(m.test_pid, 0) to cast the result properly for comparison with a known PID, as in the following snippet:
STORE 0 TO ProcId, ThreadId
ThreadId = GetWindowThreadProcessId(m.nexthwnd, @ProcId)
if bitor(m.procid, 0) = ;
bitor(m.lookforpid, 0)
newhwnd = m.nexthwnd
exit
endif
Mike