Esempio n. 1
0
        protected void SetupTypeLibInfo(TypeLibrary typeLib,
                                        TYPEKIND typeKind,
                                        int index,
                                        UCOMITypeInfo typeInfo,
                                        Guid guid)
        {
            if (_hasTypeLibInfo)
            {
                return;
            }

            base.Setup(typeLib, typeKind, index, typeInfo, guid);

            TYPEATTR typeAttr;
            IntPtr   typeAttrPtr;

            _typeInfo.GetTypeAttr(out typeAttrPtr);
            typeAttr =
                (TYPEATTR)Marshal.PtrToStructure(typeAttrPtr,
                                                 typeof(TYPEATTR));

            _cImplTypes = typeAttr.cImplTypes;
            _typeFlags  = typeAttr.wTypeFlags;

            _typeInfo.ReleaseTypeAttr(typeAttrPtr);

            _hasTypeLibInfo = true;
        }
Esempio n. 2
0
		protected void SetupTypeLibInfo(TypeLibrary typeLib, 
										TYPEKIND typeKind,
										int index,
										UCOMITypeInfo typeInfo,
										Guid guid)
		{
			if (_hasTypeLibInfo)
				return;

			base.Setup(typeLib, typeKind, index, typeInfo, guid);

			TYPEATTR typeAttr;
			IntPtr typeAttrPtr;
			_typeInfo.GetTypeAttr(out typeAttrPtr);
			typeAttr = 
				(TYPEATTR)Marshal.PtrToStructure(typeAttrPtr, 
												 typeof(TYPEATTR));

			_cImplTypes = typeAttr.cImplTypes;
			_typeFlags = typeAttr.wTypeFlags;

			_typeInfo.ReleaseTypeAttr(typeAttrPtr);

			_hasTypeLibInfo = true;
		}