code: protected final IType getDispInterfaceReturnType() {
      IType r = method.getReturnType();
  
      // if the return type is HRESULT, bind it to 'void'.
      // dispinterfaces defined by C++ often uses HRESULT
      // as the return value
      IPrimitiveType pt = r.queryInterface(IPrimitiveType.class);
      if (pt != null && pt.getVarType() == VarType.VT_HRESULT) {
        // TODO: This causes a null pointer exception in some situations!
        return null;
      }
  
      return r;
    }
docs: Computes the return type for disp-only interface.