docs: def UpdateResources(dstpath, data, type_, names=None, languages=None):
      """
      Update or add resource data in dll/exe file dstpath.
      
      type_ = resource type to update
      names = a list of resource names to update (None = all)
      languages = a list of resource languages to update (None = all)
      
      """
      # look for existing resources
      res = GetResources(dstpath, [type_], names, languages)
      # add type_, names and languages not already present in existing resources
      if not type_ in res and type_ != "*":
          res[type_] = {}
      if names:
          for name in names:
              if not name in res[type_] and name != "*":
                  res[type_][name] = []
                  if languages:
                      for language in languages:
                          if not language in res[type_][name] and language != "*":
                              res[type_][name].append(language)
      # add resource to destination, overwriting existing resources
      hdst = win32api.BeginUpdateResource(dstpath, 0)
      for type_ in res:
          for name in res[type_]:
              for language in res[type_][name]:
                  logger.info("Updating resource type %s name %s language %s",
                              type_, name, language)
                  win32api.UpdateResource(hdst, type_, name, data, language)
      win32api.EndUpdateResource(hdst, 0)