From 6818785b6469e913f2a32e2ec62330c69da3931c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <1173718158@qq.com> Date: Mon, 25 Nov 2024 23:02:54 +0800 Subject: [PATCH] . --- py/LunaTranslator/myutils/hwnd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/LunaTranslator/myutils/hwnd.py b/py/LunaTranslator/myutils/hwnd.py index e293d042..70f6bf8f 100644 --- a/py/LunaTranslator/myutils/hwnd.py +++ b/py/LunaTranslator/myutils/hwnd.py @@ -116,8 +116,8 @@ def getpidexe(pid): ) if not hproc: - hproc = windows.OpenProcess( - windows.PROCESS_QUERY_LIMITED_INFORMATION, False, pid + hproc = windows.AutoHandle( + windows.OpenProcess(windows.PROCESS_QUERY_LIMITED_INFORMATION, False, pid) ) if not hproc: name_ = None