Package com.sun.jna.platform.win32.WinNT

Examples of com.sun.jna.platform.win32.WinNT.HRESULT


     *            the w ver minor
     */
    public TypeLibUtil(String clsidStr, int wVerMajor, int wVerMinor) {
        CLSID.ByReference clsid = new CLSID.ByReference();
        // get CLSID from string
        HRESULT hr = Ole32.INSTANCE.CLSIDFromString(new WString(clsidStr),
                clsid);
        COMUtils.checkRC(hr);

        // load typelib
        PointerByReference pTypeLib = new PointerByReference();
View Full Code Here


    }

    public TypeLibUtil(String file) {
        // load typelib
        PointerByReference pTypeLib = new PointerByReference();
        HRESULT hr = OleAuto.INSTANCE.LoadTypeLib(new WString(file), pTypeLib);
        COMUtils.checkRC(hr);

        // init type lib class
        this.typelib = new TypeLib(pTypeLib.getValue());
View Full Code Here

     *            the index
     * @return the type info type
     */
    public TYPEKIND getTypeInfoType(int index) {
        TYPEKIND.ByReference typekind = new TYPEKIND.ByReference();
        HRESULT hr = this.typelib.GetTypeInfoType(new UINT(index), typekind);
        COMUtils.checkRC(hr);
        return typekind;
    }
View Full Code Here

     *            the index
     * @return the type info
     */
    public ITypeInfo getTypeInfo(int index) {
        PointerByReference ppTInfo = new PointerByReference();
        HRESULT hr = this.typelib.GetTypeInfo(new UINT(index), ppTInfo);
        COMUtils.checkRC(hr);
        return new TypeInfo(ppTInfo.getValue());
    }
View Full Code Here

     *
     * @return the lib attr
     */
    public TLIBATTR getLibAttr() {
        PointerByReference ppTLibAttr = new PointerByReference();
        HRESULT hr = typelib.GetLibAttr(ppTLibAttr);
        COMUtils.checkRC(hr);

        return new TLIBATTR(ppTLibAttr.getValue());
    }
View Full Code Here

     *
     * @return the i type comp. by reference
     */
    public TypeComp GetTypeComp() {
        PointerByReference ppTComp = new PointerByReference();
        HRESULT hr = this.typelib.GetTypeComp(ppTComp);
        COMUtils.checkRC(hr);

        return new TypeComp(ppTComp.getValue());
    }
View Full Code Here

        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()
View Full Code Here

        LPOLESTR szNameBuf = new LPOLESTR(nameBuf);
        ULONG lHashVal = new ULONG(hashVal);
        BOOLByReference pfName = new BOOLByReference();

        HRESULT hr = this.typelib.IsName(szNameBuf, lHashVal, pfName);
        COMUtils.checkRC(hr);

        return new IsName(szNameBuf.getValue(), pfName.getValue()
                .booleanValue());
    }
View Full Code Here

        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];
View Full Code Here

    }

    public COMBindingBaseObject(CLSID clsid, boolean useActiveInstance,
            int dwClsContext) {
        // Initialize COM for this thread...
        HRESULT hr = Ole32.INSTANCE.CoInitialize(null);

        if (COMUtils.FAILED(hr)) {
            Ole32.INSTANCE.CoUninitialize();
            throw new COMException("CoInitialize() failed!");
        }
View Full Code Here

TOP

Related Classes of com.sun.jna.platform.win32.WinNT.HRESULT

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.