Examples of toSafeArray()


Examples of com.jacob.com.Variant.toSafeArray()

        for (i = 0; i < count; i++) {
          SafeArray a1 = new SafeArray(Variant.VariantVariant, 2);
          a1.setVariant(0, new Variant("foo"));
          a1.setVariant(1, new Variant("bar"));
          Variant v = new Variant(a1);
          SafeArray a2 = v.toSafeArray(true);
          if (a2 == null) {
            System.out.println("got null back from toSafeArray()");
          }
        }
        ComThread.Release();
View Full Code Here

Examples of com.jacob.com.Variant.toSafeArray()

    Dispatch qd = Dispatch.call(db, "CreateQueryDef", "").toDispatch();
    // set the SQL string on it
    Dispatch.put(qd, "SQL", sql);
    Variant result = getByQueryDef(qd);
    // the 2-d safearray is transposed from what you might expect
    System.out.println("resulting array is " + result.toSafeArray());
    close(db);
    System.out.println("about to call ComThread.Release()");
    ComThread.Release();
  }
View Full Code Here

Examples of com.jacob.com.Variant.toSafeArray()

        Variant vStep = new Variant(step);
        Variant[] params = new Variant[]{vLeft, vTop, vRight, vBottom, vColor, vShadeVariation, vStep};
        Variant result = autoItX.invoke("PixelSearch", params);
        long[] l = new long[2];
        if (result.getvt() == 8204) {
            l[0] = result.toSafeArray().getLong(0);
            l[1] = result.toSafeArray().getLong(1);
        }
       
        return l;
    }
View Full Code Here

Examples of com.jacob.com.Variant.toSafeArray()

        Variant[] params = new Variant[]{vLeft, vTop, vRight, vBottom, vColor, vShadeVariation, vStep};
        Variant result = autoItX.invoke("PixelSearch", params);
        long[] l = new long[2];
        if (result.getvt() == 8204) {
            l[0] = result.toSafeArray().getLong(0);
            l[1] = result.toSafeArray().getLong(1);
        }
       
        return l;
    }
View Full Code Here

Examples of com.jacob.com.Variant.toSafeArray()

     * @return Returns a 2 dimensional array containing the window titles
     * and corresponding handles.
     */
    public String[][] winList(String title, String text) {
        Variant result = winVariant(title, text, "WinList");
        SafeArray arr = result.toSafeArray();
        int entries = arr.getInt(0, 0);
        String[][] resultArr = new String[2][entries + 1];
        for (int i = 0; i <= entries; i++) {
            resultArr[0][i] = arr.getString(0, i);
            resultArr[1][i] = arr.getString(1, i);
View Full Code Here

Examples of com.jacob.com.Variant.toSafeArray()

     * @return Returns a 2 dimensional array containing the window titles
     * and corresponding handles.
     */
    public String[][] winList(String title) {
        Variant result = winVariant(title, "WinList");
        SafeArray arr = result.toSafeArray();
        int entries = arr.getInt(0, 0);
        String[][] resultArr = new String[2][entries + 1];
        for (int i = 0; i <= entries; i++) {
            resultArr[0][i] = arr.getString(0, i);
            resultArr[1][i] = arr.getString(1, i);
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.