Closed rogeecn closed 2 years ago
in this function
func (hWnd HWND) GetWindowThreadProcessId() uint32 { ret, _, _ := syscall.Syscall(proc.GetWindowThreadProcessId.Addr(), 2, uintptr(hWnd), 0, 0) return uint32(ret) }
after changed to
func (hWnd HWND) GetWindowThreadProcessId() (uint32,uint32) { var processId uint32 ret, _, _ := syscall.Syscall(proc.GetWindowThreadProcessId.Addr(), 2, uintptr(hWnd), uintptr(unsafe.Pointer(&processId)), 0) return uint32(ret), processId }
i got the right processID
You are correct. This function returns both the thread and process IDs. I misread the documentation.
in this function
after changed to
i got the right processID