Format: application/octet-stream
⬇ Download File (3.6 KB)
   1  import sys
   2  from types import TracebackType
   3  from typing import Any, Optional, Tuple, Type, Union
   4  
   5  _KeyType = Union[HKEYType, int]
   6  
   7  def CloseKey(__hkey: _KeyType) -> None: ...
   8  def ConnectRegistry(__computer_name: Optional[str], __key: _KeyType) -> HKEYType: ...
   9  def CreateKey(__key: _KeyType, __sub_key: Optional[str]) -> HKEYType: ...
  10  def CreateKeyEx(key: _KeyType, sub_key: Optional[str], reserved: int = ..., access: int = ...) -> HKEYType: ...
  11  def DeleteKey(__key: _KeyType, __sub_key: str) -> None: ...
  12  def DeleteKeyEx(key: _KeyType, sub_key: str, access: int = ..., reserved: int = ...) -> None: ...
  13  def DeleteValue(__key: _KeyType, __value: str) -> None: ...
  14  def EnumKey(__key: _KeyType, __index: int) -> str: ...
  15  def EnumValue(__key: _KeyType, __index: int) -> Tuple[str, Any, int]: ...
  16  def ExpandEnvironmentStrings(__str: str) -> str: ...
  17  def FlushKey(__key: _KeyType) -> None: ...
  18  def LoadKey(__key: _KeyType, __sub_key: str, __file_name: str) -> None: ...
  19  def OpenKey(key: _KeyType, sub_key: str, reserved: int = ..., access: int = ...) -> HKEYType: ...
  20  def OpenKeyEx(key: _KeyType, sub_key: str, reserved: int = ..., access: int = ...) -> HKEYType: ...
  21  def QueryInfoKey(__key: _KeyType) -> Tuple[int, int, int]: ...
  22  def QueryValue(__key: _KeyType, __sub_key: Optional[str]) -> str: ...
  23  def QueryValueEx(__key: _KeyType, __name: str) -> Tuple[Any, int]: ...
  24  def SaveKey(__key: _KeyType, __file_name: str) -> None: ...
  25  def SetValue(__key: _KeyType, __sub_key: str, __type: int, __value: str) -> None: ...
  26  def SetValueEx(
  27      __key: _KeyType, __value_name: Optional[str], __reserved: Any, __type: int, __value: Union[str, int]
  28  ) -> None: ...  # reserved is ignored
  29  def DisableReflectionKey(__key: _KeyType) -> None: ...
  30  def EnableReflectionKey(__key: _KeyType) -> None: ...
  31  def QueryReflectionKey(__key: _KeyType) -> bool: ...
  32  
  33  HKEY_CLASSES_ROOT: int
  34  HKEY_CURRENT_USER: int
  35  HKEY_LOCAL_MACHINE: int
  36  HKEY_USERS: int
  37  HKEY_PERFORMANCE_DATA: int
  38  HKEY_CURRENT_CONFIG: int
  39  HKEY_DYN_DATA: int
  40  
  41  KEY_ALL_ACCESS: int
  42  KEY_WRITE: int
  43  KEY_READ: int
  44  KEY_EXECUTE: int
  45  KEY_QUERY_VALUE: int
  46  KEY_SET_VALUE: int
  47  KEY_CREATE_SUB_KEY: int
  48  KEY_ENUMERATE_SUB_KEYS: int
  49  KEY_NOTIFY: int
  50  KEY_CREATE_LINK: int
  51  
  52  KEY_WOW64_64KEY: int
  53  KEY_WOW64_32KEY: int
  54  
  55  REG_BINARY: int
  56  REG_DWORD: int
  57  REG_DWORD_LITTLE_ENDIAN: int
  58  REG_DWORD_BIG_ENDIAN: int
  59  REG_EXPAND_SZ: int
  60  REG_LINK: int
  61  REG_MULTI_SZ: int
  62  REG_NONE: int
  63  REG_RESOURCE_LIST: int
  64  REG_FULL_RESOURCE_DESCRIPTOR: int
  65  REG_RESOURCE_REQUIREMENTS_LIST: int
  66  REG_SZ: int
  67  
  68  REG_CREATED_NEW_KEY: int  # undocumented
  69  REG_LEGAL_CHANGE_FILTER: int  # undocumented
  70  REG_LEGAL_OPTION: int  # undocumented
  71  REG_NOTIFY_CHANGE_ATTRIBUTES: int  # undocumented
  72  REG_NOTIFY_CHANGE_LAST_SET: int  # undocumented
  73  REG_NOTIFY_CHANGE_NAME: int  # undocumented
  74  REG_NOTIFY_CHANGE_SECURITY: int  # undocumented
  75  REG_NO_LAZY_FLUSH: int  # undocumented
  76  REG_OPENED_EXISTING_KEY: int  # undocumented
  77  REG_OPTION_BACKUP_RESTORE: int  # undocumented
  78  REG_OPTION_CREATE_LINK: int  # undocumented
  79  REG_OPTION_NON_VOLATILE: int  # undocumented
  80  REG_OPTION_OPEN_LINK: int  # undocumented
  81  REG_OPTION_RESERVED: int  # undocumented
  82  REG_OPTION_VOLATILE: int  # undocumented
  83  REG_REFRESH_HIVE: int  # undocumented
  84  REG_WHOLE_HIVE_VOLATILE: int  # undocumented
  85  
  86  error = OSError
  87  
  88  # Though this class has a __name__ of PyHKEY, it's exposed as HKEYType for some reason
  89  class HKEYType:
  90      def __bool__(self) -> bool: ...
  91      def __int__(self) -> int: ...
  92      def __enter__(self) -> HKEYType: ...
  93      def __exit__(
  94          self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]
  95      ) -> Optional[bool]: ...
  96      def Close(self) -> None: ...
  97      def Detach(self) -> int: ...
  98