def __init__(self, pid):
handle = self.handle = ctypes.windll.kernel32.OpenProcess(
READ_ACCESS, # win32con.PROCESS_ALL_ACCESS,
False,
pid)
# Close the handle on GC so we do not leak handles.
self._closer = weakref.ref(self, lambda x: CloseHandle(handle))
评论列表
文章目录