init commit

This commit is contained in:
Ivey Song
2026-06-01 13:42:38 +08:00
parent 94e2886698
commit 2226a22ae8
60 changed files with 12075 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import ctypes
import sys
def is_program_running(name='Global\\Decoder'):
# 创建互斥体
mutex_name =name
h_mutex = ctypes.windll.kernel32.CreateMutexW(None, False, mutex_name)
# 检查互斥体是否已经存在
if ctypes.windll.kernel32.GetLastError() == 183: # ERROR_ALREADY_EXISTS
print("程序已经在运行.")
return True
return False