Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from raflib import *
- import ctypes
- from ctypes import *
- kernel32 = ctypes.wintypes.windll.kernel32
- user32 = ctypes.wintypes.windll.user32
- def GetProcFromWindow(hwnd):
- pid = c_int()
- user32.GetWindowThreadProcessId.argtypes = [c_void_p,POINTER(c_long)]
- user32.GetWindowThreadProcessId(hwnd,pid)
- return pid
- if __name__ == '__main__':
- print GetProcFromWindow(display.client).value
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement