mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2024-11-14 17:40:24 -08:00
14 lines
402 B
Python
14 lines
402 B
Python
import ctypes.wintypes
|
|
|
|
TOKEN_ALL_ACCESS = 0xF01FF
|
|
|
|
GetCurrentProcess = ctypes.windll.kernel32.GetCurrentProcess
|
|
GetCurrentProcess.restype = ctypes.wintypes.HANDLE
|
|
OpenProcessToken = ctypes.windll.advapi32.OpenProcessToken
|
|
OpenProcessToken.argtypes = (
|
|
ctypes.wintypes.HANDLE,
|
|
ctypes.wintypes.DWORD,
|
|
ctypes.POINTER(ctypes.wintypes.HANDLE),
|
|
)
|
|
OpenProcessToken.restype = ctypes.wintypes.BOOL
|