nzbToMedia/libs/win/jaraco/windows/api/user.py
2022-11-29 00:44:47 -05:00

11 lines
307 B
Python

import ctypes.wintypes
try:
from ctypes.wintypes import LPDWORD
except ImportError:
LPDWORD = ctypes.POINTER(ctypes.wintypes.DWORD) # type: ignore
GetUserName = ctypes.windll.advapi32.GetUserNameW
GetUserName.argtypes = ctypes.wintypes.LPWSTR, LPDWORD
GetUserName.restype = ctypes.wintypes.DWORD