Examples of BSTRByReference


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

     * @param index
     *            the index
     * @return the documentation
     */
    public TypeLibDoc getDocumentation(int index) {
        BSTRByReference pBstrName = new BSTRByReference();
        BSTRByReference pBstrDocString = new BSTRByReference();
        DWORDByReference pdwHelpContext = new DWORDByReference();
        BSTRByReference pBstrHelpFile = new BSTRByReference();

        HRESULT hr = typelib.GetDocumentation(index, pBstrName, pBstrDocString,
                pdwHelpContext, pBstrHelpFile);
        COMUtils.checkRC(hr);

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

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

        return typeLibDoc;
    }
View Full Code Here

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

     *            the found
     * @return the find name
     */
    public FindName FindName(String name, int hashVal, short found) {
        /* [annotation][out][in] */
        BSTRByReference szNameBuf = new BSTRByReference(
                OleAuto.INSTANCE.SysAllocString(name));
        /* [in] */ULONG lHashVal = new ULONG(hashVal);
        /* [out][in] */USHORTByReference pcFound = new USHORTByReference(found);

        HRESULT hr = this.typelib.FindName(szNameBuf, lHashVal, null, null,
                pcFound);
        COMUtils.checkRC(hr);

        found = pcFound.getValue().shortValue();
        /* [length_is][size_is][out] */ITypeInfo[] ppTInfo = new ITypeInfo[found];
        /* [length_is][size_is][out] */MEMBERID[] rgMemId = new MEMBERID[found];
        hr = this.typelib.FindName(szNameBuf, lHashVal, ppTInfo, rgMemId,
                pcFound);
        COMUtils.checkRC(hr);

        FindName findName = new FindName(szNameBuf.getString(), ppTInfo,
                rgMemId, found);
        OLEAUTO.SysFreeString(szNameBuf.getValue());

        return findName;
    }
View Full Code Here

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

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

    }

    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

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

    }

    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

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

     * @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

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

     * @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

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

     *            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

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

        // 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
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.