import ctypes


def _load_cdll(sdk_path: str) -> ctypes.CDLL:
  """Loads SDK dynamic library."""
  handle = ctypes.cdll.LoadLibrary(sdk_path)
  handle.WTQInit.restype = ctypes.c_bool
  handle.WTQGetDeviceInformation.restype = ctypes.c_bool
  handle.WTQGetHWInformation.restype = ctypes.c_bool
  handle.WTQGetPPGDeviceInformation.restype = ctypes.c_bool
  handle.WTQGetPPGHWInformation.restype = ctypes.c_bool
  handle.WTQGetSerialNumber.restype = ctypes.c_char_p
  handle.WTQGetPPGSerialNumber.restype = ctypes.c_char_p
  return handle