I'm reading Black Hat Python and in chapter 8 I find "user32.GetWindowThreadProcessID(hwnd,byref(pid))" doesn't work, just like the picture shows.
It seems that python can't find GetWindowThreadProcessID, but it can find GetForegroundWindow which also is exported from user32.dll.
I also try "windll.LoadLibrary("user32.dll")", but it still doesn't work.
Thank you!