Ejemplo n.º 1
0
        /// <summary>
        /// AddReferenceToTypeLibrary(guid) -> None
        ///
        /// Makes the type lib desc available for importing.  See also LoadTypeLibrary.
        /// </summary>
        public static void AddReferenceToTypeLibrary(CodeContext /*!*/ context, Guid typeLibGuid)
        {
            ComTypeLibInfo typeLibInfo;

            typeLibInfo = ComTypeLibDesc.CreateFromGuid(typeLibGuid);
            PublishTypeLibDesc(context, typeLibInfo.TypeLibDesc);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// AddReferenceToTypeLibrary(rcw) -> None
        ///
        /// Makes the type lib desc available for importing. See also LoadTypeLibrary.
        /// </summary>
        public static void AddReferenceToTypeLibrary(CodeContext /*!*/ context, object rcw)
        {
            ComTypeLibInfo typeLibInfo;

            typeLibInfo = ComTypeLibDesc.CreateFromObject(rcw);
            PublishTypeLibDesc(context, typeLibInfo.TypeLibDesc);
        }
Ejemplo n.º 3
0
 private static void PublishTypeLibDesc(CodeContext context, ComTypeLibDesc typeLibDesc)
 {
     PythonOps.ScopeSetMember(context, context.LanguageContext.DomainManager.Globals, typeLibDesc.Name, typeLibDesc);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// LoadTypeLibrary(guid) -> type lib desc
 ///
 /// Reads the latest registered type library for the corresponding GUID,
 /// reads definitions of CoClass'es and Enum's from this library
 /// and creates a IDynamicMetaObjectProvider that allows to instantiate coclasses
 /// and get actual values for the enums.
 /// </summary>
 public static ComTypeLibInfo LoadTypeLibrary(CodeContext /*!*/ context, Guid typeLibGuid)
 {
     return(ComTypeLibDesc.CreateFromGuid(typeLibGuid));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// LoadTypeLibrary(rcw) -> type lib desc
 ///
 /// Gets an ITypeLib object from OLE Automation compatible RCW ,
 /// reads definitions of CoClass'es and Enum's from this library
 /// and creates an object that allows to instantiate coclasses
 /// and get actual values for the enums.
 /// </summary>
 public static ComTypeLibInfo LoadTypeLibrary(CodeContext /*!*/ context, object rcw)
 {
     return(ComTypeLibDesc.CreateFromObject(rcw));
 }