lib/win32/activate.rb
# Find process id and window handler.
# If process has not window handler, find parent process, parent's parent process ...
# If result of search parent process reach to nil, then return nil
Find process id and window handler.
If process has not window handler, find parent process, parent's parent process
If result of search parent process reach to nil, then return nil
Find process id and window handler . If process has not window handler find parent process parent ' s parent process If result of search parent process reach to nil then return nil
def find_parent_process_with_hwnd pid
      while hwnd=pid_to_hwnd[pid].nil?
        pid = find_parent_pid(pid)
        return nil unless pid
      end
      return [pid,hwnd]
    end
def find_parent_process_with_hwnd pid while hwnd = pid_to_hwnd [ pid ] . nil? pid = find_parent_pid ( pid ) return nil unless pid end return [ pid , hwnd ] end
Find process id and window handler.
Find process id and window handler .
pid
<not_specific>