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

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


    }

    public void testGetDocumentation() {
        ITypeInfo typeInfo = getTypeInfo();
        MEMBERID memid = new MEMBERID(0);
        BSTRByReference pBstrName = new BSTRByReference();
        BSTRByReference pBstrDocString = new BSTRByReference();
        DWORDByReference pdwHelpContext = new DWORDByReference();
        BSTRByReference pBstrHelpFile = new BSTRByReference();
        HRESULT hr = typeInfo.GetDocumentation(memid, pBstrName,
                pBstrDocString, pdwHelpContext, pBstrHelpFile);

        COMUtils.checkRC(hr);
        assertEquals(0, hr.intValue());
View Full Code Here


    }

    public void testGetDllEntry() {
        ITypeInfo typeInfo = getTypeInfo();
        MEMBERID memid = new MEMBERID(0);
        BSTRByReference pBstrDllName = new BSTRByReference();
        BSTRByReference pBstrName = new BSTRByReference();
        WORDByReference pwOrdinal = new WORDByReference();
        HRESULT hr = typeInfo.GetDllEntry(memid, INVOKEKIND.INVOKE_FUNC,
                pBstrDllName, pBstrName, pwOrdinal);

        COMUtils.checkRC(hr);
View Full Code Here

    }

    public void testGetMops() {
        ITypeInfo typeInfo = getTypeInfo();
        MEMBERID memid = new MEMBERID(0);
        BSTRByReference pBstrMops = new BSTRByReference();
        HRESULT hr = typeInfo.GetMops(memid, pBstrMops);

        COMUtils.checkRC(hr);
        assertEquals(0, hr.intValue());
        //System.out.println("pBstrMops: " + pBstrMops.toString());
View Full Code Here

     * @param memid
     *            the memid
     * @return the documentation
     */
    public TypeInfoDoc getDocumentation(MEMBERID memid) {
        BSTRByReference pBstrName = new BSTRByReference();
        BSTRByReference pBstrDocString = new BSTRByReference();
        DWORDByReference pdwHelpContext = new DWORDByReference();
        BSTRByReference pBstrHelpFile = new BSTRByReference();

        HRESULT hr = this.typeInfo.GetDocumentation(memid, pBstrName,
                pBstrDocString, pdwHelpContext, pBstrHelpFile);
        COMUtils.checkRC(hr);

        TypeInfoDoc TypeInfoDoc = new TypeInfoDoc(pBstrName.getString(),
                pBstrDocString.getString(), pdwHelpContext.getValue()
                        .intValue(), pBstrHelpFile.getString());

        OLEAUTO.SysFreeString(pBstrName.getValue());
        OLEAUTO.SysFreeString(pBstrDocString.getValue());
        OLEAUTO.SysFreeString(pBstrHelpFile.getValue());

        return TypeInfoDoc;
    }
View Full Code Here

     * @param invKind
     *            the inv kind
     * @return the dll entry
     */
    public DllEntry GetDllEntry(MEMBERID memid, INVOKEKIND invKind) {
        BSTRByReference pBstrDllName = new BSTRByReference();
        BSTRByReference pBstrName = new BSTRByReference();
        WORDByReference pwOrdinal = new WORDByReference();

        HRESULT hr = this.typeInfo.GetDllEntry(memid, invKind, pBstrDllName,
                pBstrName, pwOrdinal);
        COMUtils.checkRC(hr);

        OLEAUTO.SysFreeString(pBstrDllName.getValue());
        OLEAUTO.SysFreeString(pBstrName.getValue());

        return new DllEntry(pBstrDllName.getString(), pBstrName.getString(),
                pwOrdinal.getValue().intValue());
    }
View Full Code Here

     *            the memid
     * @return the string
     */
    public String GetMops(MEMBERID memid) {

        BSTRByReference pBstrMops = new BSTRByReference();
        HRESULT hr = this.typeInfo.GetMops(memid, pBstrMops);
        COMUtils.checkRC(hr);

        return pBstrMops.getString();
    }
View Full Code Here

        // System.out.println("pTComp: " + pTComp.toString());
    }

    public void testFindName() {
        ITypeLib shellTypeLib = loadShellTypeLib();
        BSTRByReference szNameBuf = new BSTRByReference(OleAuto.INSTANCE.SysAllocString("Application"));
        ULONG lHashVal = new ULONG(0);
        USHORTByReference pcFound = new USHORTByReference((short)20);

        HRESULT hr = shellTypeLib.FindName(szNameBuf, lHashVal, null, null, pcFound);
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.BSTRByReference

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.