/// <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); }
/// <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); }
private static void PublishTypeLibDesc(CodeContext context, ComTypeLibDesc typeLibDesc) { PythonOps.ScopeSetMember(context, context.LanguageContext.DomainManager.Globals, typeLibDesc.Name, typeLibDesc); }
/// <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)); }
/// <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)); }