Examples of HResult


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

   */
  public static VARIANT SafeArrayGetElement(SAFEARRAY array, long index) {
    long[] idx = new long[1];
    idx[0] = index;
    VARIANT result = new VARIANT();
    HRESULT hr = OleAuto.INSTANCE.SafeArrayGetElement(array, idx,
        result.getPointer());
    COMUtils.SUCCEEDED(hr);
    return result;
  }
View Full Code Here

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

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

    }

    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

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

     *            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

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

     *            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

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

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

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

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

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

        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

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

        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

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

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