Esempio n. 1
0
        public OWTypeDef(ITlibNode parent, ITypeInfo ti, TypeAttr ta)
        {
            Parent = parent;
            _ta    = ta;
            _ti    = ti;

            string prefix = string.Empty;

            if (VarEnum.VT_PTR == ((VarEnum)_ta.tdescAlias.vt & VarEnum.VT_PTR))
            {
                var otd = _ta.tdescAlias.lptdsec;
                _ti.GetRefTypeInfo(otd.hreftype, out _oti);
                prefix = _oti.GetName() + " ";
            }
            else if (VarEnum.VT_ARRAY == ((VarEnum)_ta.tdescAlias.vt & VarEnum.VT_ARRAY))
            {
                var oad = ta.tdescAlias.lpadesc;
                _ti.GetRefTypeInfo(oad.tdescElem.hreftype, out _oti);
                prefix = _oti.GetName() + " ";
            }
            else
            {
                _ti.GetRefTypeInfo(_ta.tdescAlias.hreftype, out _oti);
                prefix = _oti.GetName() + " ";
            }
            _name = prefix + ti.GetName();
            _data = new IDLData(this);
        }
Esempio n. 2
0
        public OWTypeDef(ITlibNode parent, ITypeInfo ti, TypeAttr ta)
        {
            Parent = parent;
            _ta    = ta;
            _ti    = ti;

            string prefix = string.Empty;

            if (VarEnum.VT_ARRAY == ((VarEnum)_ta.tdescAlias.vt & VarEnum.VT_ARRAY))
            {
                var oad = ta.tdescAlias.lpadesc;
                _ti.GetRefTypeInfo(oad.tdescElem.hreftype, out _oti);
                prefix = _oti.GetName() + " ";
            }
            else
            {
                TmpIdlFormatter tmp = new TmpIdlFormatter();
                _ta.tdescAlias.ComTypeNameAsString(ti, tmp);
                prefix = tmp.data + " ";
                if (VarEnum.VT_USERDEFINED == (VarEnum)_ta.tdescAlias.vt)
                {
                    _ti.GetRefTypeInfo(_ta.tdescAlias.hreftype, out _oti);
                }
            }
            _name = prefix + ti.GetName();
            _data = new IDLData(this);
        }
Esempio n. 3
0
        public OWModule(ITlibNode parent, ITypeInfo ti, TypeAttr ta)
        {
            Parent = parent;
            _ti    = ti;
            _ta    = ta;
            _name  = _ti.GetName();
            if (_ta.cVars <= 0 && _ta.cFuncs <= 0)
            {
                return;
            }
            var tix = new olewoo_interop.ITypeInfoXtra();

            if (_ta.cFuncs > 0)
            {
                var fd      = new FuncDesc(_ti, 0);
                var invkind = fd.invkind;
                var memid   = fd.memid;
                _dllname = tix.GetDllEntry(ti, invkind, memid);
            }
            else
            {
                _dllname = null;
            }
            _data = new IDLData(this);
        }
Esempio n. 4
0
 public OWRecord(ITlibNode parent, ITypeInfo ti, TypeAttr ta)
 {
     Parent = parent;
     _ti    = ti;
     _ta    = ta;
     _name  = _ti.GetName();
     _data  = new IDLData(this);
 }
Esempio n. 5
0
        public OWTypeLib(ITypeLib tlib)
        {
            _tlib  = tlib;
            _name  = _tlib.GetName();
            _name += " (" + _tlib.GetHelpDocumentation(out _) + ")";

            _data = new IDLData(this);
        }
Esempio n. 6
0
 public OWDispProperty(ITlibNode parent, ITypeInfo ti, VarDesc vd)
 {
     Parent = parent;
     _name  = ti.GetDocumentationById(vd.memid);
     _vd    = vd;
     _ti    = ti;
     _data  = new IDLData(this);
 }
Esempio n. 7
0
 public OWInterface(ITlibNode parent, ITypeInfo ti, TypeAttr ta, bool topLevel)
 {
     Parent    = parent;
     _name     = ti.GetName();
     _ta       = ta;
     _ti       = ti;
     _topLevel = topLevel;
     _data     = new IDLData(this);
 }
Esempio n. 8
0
 public OWEnumValue(ITlibNode parent, ITypeInfo ti, VarDesc vd)
 {
     Parent = parent;
     _name  = ti.GetDocumentationById(vd.memid);
     _val   = (int)vd.varValue;
     _vd    = vd;
     _ti    = ti;
     _data  = new IDLData(this);
 }
Esempio n. 9
0
        public OWRecordMember(ITlibNode parent, ITypeInfo ti, VarDesc vd)
        {
            Parent = parent;
            _name  = ti.GetDocumentationById(vd.memid);
            var ig = new IDLGrabber();

            vd.elemDescVar.tdesc.ComTypeNameAsString(ti, ig);
            _type = ig.Value;
            _data = new IDLData(this);
        }
Esempio n. 10
0
        public OWMethod(ITlibNode parent, ITypeInfo ti, FuncDesc fd)
        {
            Parent = parent;
            _ti    = ti;
            _fd    = fd;

            var names = fd.GetNames(ti);

            _name = names[0];
            _data = new IDLData(this);
        }
Esempio n. 11
0
        public OWCoClassInterface(ITlibNode parent, ITypeInfo ti, IMPLTYPEFLAGS impltypeflags)
        {
            Parent    = parent;
            Listeners = parent.Listeners;

            _ti    = ti;
            _flags = impltypeflags;

            _name = _ti.GetName();
            _data = new IDLData(this);
        }
Esempio n. 12
0
 public OWDispInterface(ITlibNode parent, ITypeInfo ti, TypeAttr ta, bool topLevel)
 {
     Parent          = parent;
     _name           = ti.GetName();
     _ta             = ta;
     _ti             = ti;
     _methodChildren = new OWIDispatchMethods(this);
     _propChildren   = new OWIDispatchProperties(this);
     _topLevel       = topLevel;
     _data           = new IDLData(this);
 }
Esempio n. 13
0
        public OWTypeLib(string path)
        {
            NativeMethods.LoadTypeLib(path, out _tlib);
            if (_tlib == null)
            {
                throw new Exception(path + " is not a loadable typelibrary.");
            }
            _name  = _tlib.GetName();
            _name += " (" + _tlib.GetHelpDocumentation(out _) + ")";

            _data = new IDLData(this);
        }
Esempio n. 14
0
        public OWModuleConst(ITlibNode parent, ITypeInfo ti, VarDesc vd, int idx)
        {
            _idx   = idx;
            Parent = parent;
            var ig = new IDLGrabber();

            vd.elemDescVar.tdesc.ComTypeNameAsString(ti, ig);
            _name = ig.Value + " " + ti.GetDocumentationById(vd.memid);
            _val  = vd.varValue ?? "";
            if (_val is string)
            {
                _val = (_val as string).ReEscape();
            }
            _data = new IDLData(this);
        }