Examples of IDispatch


Examples of jp.ne.so_net.ga2.no_ji.jcom.IDispatch

     *
     * @param name Name des DataSets
     * @return DataSet
     */
    public IDispatch getDataSet(String name) {
        IDispatch toReturn = null;
        try {
            IDispatch dataSetInfos = (IDispatch) app.get("DataSetInfos", new Object[]{name});
            toReturn = (IDispatch) dataSetInfos.method("CreateDataSet", null);
        } catch (JComException ex) {
            ErrorHandling.showError("DataSet " + name + " nicht vorhanden.");
        }
        return toReturn;
    }
View Full Code Here

Examples of jp.ne.so_net.ga2.no_ji.jcom.IDispatch

     *
     * @param dataset DataSet
     * @return Field
     */
    public IDispatch getFields(IDispatch dataset) {
        IDispatch toReturn = null;
        try {
            toReturn = (IDispatch) dataset.get("Fields");
        } catch (JComException ex) {
            ErrorHandling.showError("Fields nicht erreichbar.");
        }
View Full Code Here

Examples of jp.ne.so_net.ga2.no_ji.jcom.IDispatch

     * @param fields Field
     * @param art Itemname
     * @return Item
     */
    public IDispatch getItem(IDispatch fields, String art) {
        IDispatch toReturn = null;
        try {
            toReturn = (IDispatch) fields.get("Item", new Object[]{art});
        } catch (JComException ex) {
            ErrorHandling.showError("Item nicht erreichbar.");
        }
View Full Code Here

Examples of jp.ne.so_net.ga2.no_ji.jcom.IDispatch

     * @return Itemtext
     */
    public String getItemInfo(IDispatch fields, String art) {
        String toReturn = null;
        try {
            IDispatch zwischen = (IDispatch) fields.get("Item", new Object[]{art});
            toReturn = (String) zwischen.get("Text", null);
        } catch (JComException ex) {
            ErrorHandling.showError("ItemInfo nicht erreichbar.");
        }
        return toReturn;
    }
View Full Code Here

Examples of jp.ne.so_net.ga2.no_ji.jcom.IDispatch

     * @param dataset DataSet
     * @param name Indice-Name
     */
    public void sort(IDispatch dataset, String name) {
        try {
            IDispatch tosort = (IDispatch) dataset.get("Indices", new Object[]{name});
            tosort.method("Select", null);
        } catch (JComException ex) {
            ErrorHandling.showError("Indices " + name + " nicht vorhanden.");
        }
    }
View Full Code Here

Examples of jp.ne.so_net.ga2.no_ji.jcom.IDispatch

     * @param endvalue Ende
     */
    public void setRange(IDispatch dataset, String art, String startvalue, String endvalue) {
        try {
            dataset.method("editrangestart", null);
            IDispatch fields = (IDispatch) dataset.get("Fields", new Object[]{art});
            fields.put("AsString", startvalue);
            dataset.method("editrangeend", null);
            fields = (IDispatch) dataset.get("Fields", new Object[]{art});
            fields.put("AsString", endvalue);
            dataset.method("applyrange", null);
        } catch (JComException ex) {
            ErrorHandling.showError("SetRange nicht möglich.");
        }
    }
View Full Code Here

Examples of org.eclipse.swt.internal.ole.win32.IDispatch

                (IDispatchImpl) WrappersCache.getWrapperForObject(classLoader, obj);
            if (dispMethod == null || dispMethod.refCount < 1) {
              dispMethod = new MethodDispatch(classLoader, dispIdOracle, method);
              WrappersCache.putWrapperForObject(classLoader, obj, dispMethod);
            }
            IDispatch disp = new IDispatch(dispMethod.getAddress());
            disp.AddRef();
            return new Variant(disp);
          }
        } else if (javaDispatch.isField(dispId)) {
          Field field = javaDispatch.getField(dispId);
          if (flags == COM.DISPATCH_PROPERTYGET) {
View Full Code Here

Examples of org.eclipse.swt.internal.ole.win32.IDispatch

              (IDispatchImpl) WrappersCache.getWrapperForObject(classLoader, obj);
          if (dispMethod == null || dispMethod.refCount < 1) {
            dispMethod = new MethodDispatch(classLoader, dispIdOracle, toStringMethod);
            WrappersCache.putWrapperForObject(classLoader, obj, dispMethod);
          }
          IDispatch disp = new IDispatch(dispMethod.getAddress());
          disp.AddRef();
          return new Variant(disp);
        }
        break;
      case 2 :
        // call
View Full Code Here

Examples of org.eclipse.swt.internal.ole.win32.IDispatch

        // MAGIC: this is the default property, let's just do toString()
        return new Variant(toString());
      } else if (dispId == 1) {
        if ((flags & COM.DISPATCH_METHOD) != 0) {
          try {
            IDispatch frameWnd =
                params[0].getType() == COM.VT_DISPATCH ? params[0].getDispatch() : null;
            boolean success = gwtOnLoad(frameWnd);
            // boolean return type
            return new Variant(success);
          } catch (SWTException e) {
            throw new HResultException(COM.E_INVALIDARG);
          }
        } else if ((flags & COM.DISPATCH_PROPERTYGET) != 0) {
          // property get on the method itself
          try {
            IDispatchImpl funcObj = new IDispatchImpl() {
              // do nothing, just return some IDispatch
              @Override
              protected Variant invoke(int dispId, int flags, Variant[] params)
                  throws HResultException, InstantiationException, InvocationTargetException {
                return new Variant();
              }

              @Override
              protected void getIDsOfNames(String[] names, int[] ids) throws HResultException {
              }
            };
            IDispatch disp = new IDispatch(funcObj.getAddress());
            disp.AddRef();
            return new Variant(disp);
          } catch (Exception e) {
            // just return VT_EMPTY
            return new Variant();
          }
View Full Code Here

Examples of org.eclipse.swt.internal.ole.win32.IDispatch

      int dispIdMember,
      int wFlags,
      Variant[] rgvarg,
      int[] rgdispidNamedArgs,
      Variant pVarResult) throws Exception {
    IDispatch objIDispatch = (IDispatch) ReflectionUtils.getFieldObject(automation, "objIDispatch");
    // get the IDispatch interface for the control
    if (objIDispatch == null)
      return COM.E_FAIL;
    // create a DISPPARAMS structure for the input parameters
    DISPPARAMS pDispParams = new DISPPARAMS();
    // store arguments in rgvarg
    if (rgvarg != null && rgvarg.length > 0) {
      pDispParams.cArgs = rgvarg.length;
      pDispParams.rgvarg =
          OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, VARIANT.sizeof * rgvarg.length);
      int offset = 0;
      for (int i = rgvarg.length - 1; i >= 0; i--) {
        ReflectionUtils.invokeMethod(rgvarg[i], "getData(int)", pDispParams.rgvarg + offset);
        offset += VARIANT.sizeof;
      }
    }
    // if arguments have ids, store the ids in rgdispidNamedArgs
    if (rgdispidNamedArgs != null && rgdispidNamedArgs.length > 0) {
      pDispParams.cNamedArgs = rgdispidNamedArgs.length;
      pDispParams.rgdispidNamedArgs =
          OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, 4 * rgdispidNamedArgs.length);
      int offset = 0;
      for (int i = rgdispidNamedArgs.length; i > 0; i--) {
        COM.MoveMemory(
            pDispParams.rgdispidNamedArgs + offset,
            new int[]{rgdispidNamedArgs[i - 1]},
            4);
        offset += 4;
      }
    }
    // invoke the method
    EXCEPINFO excepInfo = new EXCEPINFO();
    int[] pArgErr = new int[1];
    int /*long*/pVarResultAddress = 0;
    if (pVarResult != null)
      pVarResultAddress = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof);
    int result =
        objIDispatch.Invoke(
            dispIdMember,
            new GUID(),
            COM.LOCALE_USER_DEFAULT,
            wFlags,
            pDispParams,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.