Skip to content

Commit 9324fb1

Browse files
committed
修复未释放COM环境问题
1 parent 1d851e4 commit 9324fb1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

main/core/tools.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ def changeMute(hwnd,flag=1):
112112
break
113113
except Exception as e:
114114
print("tools-changeMute: ",e)
115+
finally:
116+
# 释放 COM 环境
117+
try:
118+
pythoncom.CoUninitialize()
119+
except:
120+
pass
115121

116122
def remove_duplicates(input_list: list):
117123
"""

0 commit comments

Comments
 (0)