首页 > 系统相关 >隐藏进程

隐藏进程

时间:2023-08-02 23:55:23浏览次数:23  
标签:process ctypes ShowWindow 进程 user32 隐藏

import ctypes

# 定义Windows API函数
import time

user32 = ctypes.WinDLL("user32")
user32.ShowWindow.argtypes = [ctypes.c_void_p, ctypes.c_int]
user32.ShowWindow.restype = ctypes.c_int

# 隐藏进程函数
def hide_process():
    # 获取当前进程的窗口句柄
    hwnd = user32.GetForegroundWindow()

    # 隐藏进程的窗口
    user32.ShowWindow(hwnd, 0)

# 调用隐藏进程函数
hide_process()
time.sleep(20)

 

标签:process,ctypes,ShowWindow,进程,user32,隐藏
From: https://www.cnblogs.com/zwnsyw/p/17602137.html

相关文章