Examples of queryInterface()


Examples of com.jacob.activeX.ActiveXComponent.QueryInterface()

      // I am now dealing with the default interface (IFace1)
      Dispatch.put(mf, "Face1Name", new Variant("Hello Face1"));
      System.out.println(Dispatch.get(mf, "Face1Name"));

      // get to IFace2 through the IID
      Dispatch f2 = mf
          .QueryInterface("{9BF24410-B2E0-11D4-A695-00104BFF3241}");
      // I am now dealing with IFace2
      Dispatch.put(f2, "Face2Nam", new Variant("Hello Face2"));
      System.out.println(Dispatch.get(f2, "Face2Nam"));
View Full Code Here

Examples of com.jacob.activeX.ActiveXComponent.QueryInterface()

      // I am now dealing with IFace2
      Dispatch.put(f2, "Face2Nam", new Variant("Hello Face2"));
      System.out.println(Dispatch.get(f2, "Face2Nam"));

      // get to IFace3 through the IID
      Dispatch f3 = mf
          .QueryInterface("{9BF24411-B2E0-11D4-A695-00104BFF3241}");
      // I am now dealing with IFace3
      Dispatch.put(f3, "Face3Name", new Variant("Hello Face3"));
      System.out.println(Dispatch.get(f3, "Face3Name"));
View Full Code Here

Examples of com4j.tlbimp.def.IType.queryInterface()

        IType r = method.getReturnType();

        // if the return type is HRESULT, bind it to 'void'.
        // dispinterfaces defined by C++ often uses HRESULT
        // as the return value
        IPrimitiveType pt = r.queryInterface(IPrimitiveType.class);
        if(pt!=null && pt.getVarType()== VarType.VT_HRESULT)
            return null;

        return r;
    }
View Full Code Here

Examples of com4j.tlbimp.def.IType.queryInterface()

                IPtrType pt = mb.returnType.queryInterface(IPtrType.class);
                IDispInterfaceDecl di = null;
                IInterfaceDecl ii = null;
                if (pt != null) {
                    IType t = pt.getPointedAtType();
                    di = t.queryInterface(IDispInterfaceDecl.class);
                    ii = t.queryInterface(IInterfaceDecl.class);
                }

                if (di == null && ii == null)
                    break;
View Full Code Here

Examples of com4j.tlbimp.def.IType.queryInterface()

                IDispInterfaceDecl di = null;
                IInterfaceDecl ii = null;
                if (pt != null) {
                    IType t = pt.getPointedAtType();
                    di = t.queryInterface(IDispInterfaceDecl.class);
                    ii = t.queryInterface(IInterfaceDecl.class);
                }

                if (di == null && ii == null)
                    break;
View Full Code Here

Examples of com4j.tlbimp.def.IType.queryInterface()

        IPtrType ptrt = t.queryInterface(IPtrType.class);
        if(ptrt!=null) {
            // pointer type
            IType comp = ptrt.getPointedAtType();
            IInterfaceDecl compDecl = comp.queryInterface(IInterfaceDecl.class);
            if( compDecl!=null ) {
                // t = T* where T is a declared interface
                return new TypeBinding( g.getTypeName(compDecl), NativeType.ComObject, true );
            }

View Full Code Here

Examples of com4j.tlbimp.def.IType.queryInterface()

            if( compDecl!=null ) {
                // t = T* where T is a declared interface
                return new TypeBinding( g.getTypeName(compDecl), NativeType.ComObject, true );
            }

            IDispInterfaceDecl dispDecl = comp.queryInterface(IDispInterfaceDecl.class);
            if( dispDecl!=null ) {
                // t = T* where T is a declared interface
                return new TypeBinding( g.getTypeName(dispDecl), NativeType.ComObject,  true );
            }

View Full Code Here

Examples of com4j.tlbimp.def.IType.queryInterface()

                // t = T* where T is a declared interface
                return new TypeBinding( g.getTypeName(dispDecl), NativeType.ComObject,  true );
            }

            // t = coclass*
            ICoClassDecl classdecl = comp.queryInterface(ICoClassDecl.class);
            if(classdecl!=null) {
                // bind to its default interface
                ITypeDecl di = g.getDefaultInterface(classdecl);
                if(di==null)
                    // no primary interface known. treat it as IUnknown
View Full Code Here

Examples of com4j.tlbimp.def.IType.queryInterface()

                    return new TypeBinding(Com4jObject.class, NativeType.ComObject, true);
                else
                    return new TypeBinding( g.getTypeName(di), NativeType.ComObject, true );
            }

            IPrimitiveType compPrim = comp.queryInterface(IPrimitiveType.class);
            if( compPrim!=null ) {
                // T = PRIMITIVE*
                if( compPrim.getVarType()== VarType.VT_VARIANT ) {
                    // T = VARIANT*
                    return new TypeBinding(Object.class, NativeType.VARIANT_ByRef, true);
View Full Code Here

Examples of com4j.tlbimp.def.IType.queryInterface()

        ISafeArrayType at = t.queryInterface(ISafeArrayType.class);
        if(at!=null) {
            // T=SAFEARRAY(...)
            IType comp = at.getComponentType();

            IPrimitiveType compPrim = comp.queryInterface(IPrimitiveType.class);
            if( compPrim!=null ) {
                TypeBinding r = primitiveTypeBindings.get(compPrim.getVarType());
                if(r!=null) {
                    return new TypeBinding(r.javaType+"[]", NativeType.SafeArray, true );
                }
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.