Advertisement
WarPie90

Untitled

Jan 7th, 2015
480
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. from raflib import *
  2. import ctypes
  3. from ctypes import *
  4.  
  5. kernel32 = ctypes.wintypes.windll.kernel32
  6. user32 = ctypes.wintypes.windll.user32
  7.  
  8. def GetProcFromWindow(hwnd):
  9.   pid = c_int()
  10.   user32.GetWindowThreadProcessId.argtypes = [c_void_p,POINTER(c_long)]
  11.   user32.GetWindowThreadProcessId(hwnd,pid)
  12.   return pid
  13.  
  14. if __name__ == '__main__':
  15.   print GetProcFromWindow(display.client).value
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement