Package com.sun.jna.platform.win32.WTypes

Examples of com.sun.jna.platform.win32.WTypes.VARTYPE


  public OleAutoTest() {
  }

  public void testSysAllocString() {
    assertEquals(null, OleAuto.INSTANCE.SysAllocString(null));
    BSTR p = OleAuto.INSTANCE.SysAllocString("hello world");
    assertEquals("hello world", p.getValue());
    OleAuto.INSTANCE.SysFreeString(p);
  }
View Full Code Here


    SAFEARRAY.ByReference psa;
    SAFEARRAYBOUND[] rgsabound = new SAFEARRAYBOUND[1];
    rgsabound[0] = new SAFEARRAYBOUND(size, 0);

    psa = OleAuto.INSTANCE.SafeArrayCreate(
        new VARTYPE(Variant.VT_VARIANT), 1, rgsabound);

    return psa;
  }
View Full Code Here

        TYPEDESC _typeDesc = elemDesc.tdesc;
        return this.getType(_typeDesc);
    }

    protected String getType(TYPEDESC typeDesc) {
        VARTYPE vt = typeDesc.vt;
        String type = "not_defined";

        if (vt.intValue() == Variant.VT_PTR) {
            TYPEDESC lptdesc = typeDesc._typedesc.getLptdesc();
            type = this.getType(lptdesc);
        } else if (vt.intValue() == Variant.VT_SAFEARRAY
                || vt.intValue() == Variant.VT_CARRAY) {
            TYPEDESC tdescElem = typeDesc._typedesc.getLpadesc().tdescElem;
            type = this.getType(tdescElem);
        } else if (vt.intValue() == Variant.VT_USERDEFINED) {
            HREFTYPE hreftype = typeDesc._typedesc.hreftype;
            type = this.getUserdefinedType(hreftype);
        } else {
            type = this.getVarType(vt);
        }
View Full Code Here

            this.read();
            return _variant.vt;
        }

        public void setVarType(short vt) {
            this._variant.vt = new VARTYPE(vt);
        }
View Full Code Here

        public void setVarType(short vt) {
            this._variant.vt = new VARTYPE(vt);
        }

        public void setValue(int vt, Object value) {
            this.setValue(new VARTYPE(vt), value);
        }
View Full Code Here

            this.read();
            return _variant.vt;
        }

        public void setVarType(short vt) {
            this._variant.vt = new VARTYPE(vt);
        }
View Full Code Here

        public void setVarType(short vt) {
            this._variant.vt = new VARTYPE(vt);
        }

        public void setValue(int vt, Object value) {
            this.setValue(new VARTYPE(vt), value);
        }
View Full Code Here

      IntByReference lpcValues = new IntByReference();
      IntByReference lpcMaxClassLen = new IntByReference();
      IntByReference lpcMaxValueNameLen = new IntByReference();
      IntByReference lpcMaxValueLen = new IntByReference();
      IntByReference lpcbSecurityDescriptor = new IntByReference();
      FILETIME lpftLastWriteTime = new FILETIME();
      assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegQueryInfoKey(
          WinReg.HKEY_LOCAL_MACHINE, null, lpcClass, null,
          lpcSubKeys, lpcMaxSubKeyLen, lpcMaxClassLen, lpcValues,
          lpcMaxValueNameLen, lpcMaxValueLen, lpcbSecurityDescriptor,
          lpftLastWriteTime));
View Full Code Here

    /**
     *
     */
    public MONITORINFO() {
        this.cbSize = new DWORD(size());
    }
View Full Code Here

    private void newAppBar() {
        APPBARDATA data = new APPBARDATA.ByReference();
        data.cbSize.setValue(data.size());
        data.uCallbackMessage.setValue(WM_USER + 1);

        UINT_PTR result = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_NEW), data);
        assertNotNull(result);
    }
View Full Code Here

TOP

Related Classes of com.sun.jna.platform.win32.WTypes.VARTYPE

Copyright © 2018 www.massapicom. 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.