예제 #1
0
        private static IEnumerable <ITypeInfo> GetReferencedEnums(ITypeLib typeLib, ITypeInfo typeInfo, FUNCDESC funcDesc, Dictionary <Guid, ITypeInfo> processedTypeInfo)
        {
            foreach (var enumTypeInfo in GetReferencedEnums(typeLib, typeInfo, funcDesc.elemdescFunc, processedTypeInfo))
            {
                yield return(enumTypeInfo);
            }

            foreach (var elemDesc in StructHelpers.GetStructsFromArray <ELEMDESC>(funcDesc.lprgelemdescParam, funcDesc.cParams))
            {
                foreach (var enumTypeInfo in GetReferencedEnums(typeLib, typeInfo, elemDesc, processedTypeInfo))
                {
                    yield return(enumTypeInfo);
                }
            }
        }
예제 #2
0
 public static IScope <FUNCDESC> CreateFuncDescScope(this ITypeInfo typeInfo, int index)
 {
     return(StructHelpers.CreateScope <FUNCDESC>((out IntPtr pFuncDesc) => typeInfo.GetFuncDesc(index, out pFuncDesc), typeInfo.ReleaseFuncDesc));
 }
예제 #3
0
 public static IScope <VARDESC> CreateVarDescScope(this ITypeInfo typeInfo, int index)
 {
     return(StructHelpers.CreateScope <VARDESC>((out IntPtr pVarDesc) => typeInfo.GetVarDesc(index, out pVarDesc), typeInfo.ReleaseVarDesc));
 }
예제 #4
0
 public static IScope <TYPEATTR> CreateAttrScope(this ITypeInfo typeInfo)
 {
     return(StructHelpers.CreateScope <TYPEATTR>(typeInfo.GetTypeAttr, typeInfo.ReleaseTypeAttr));
 }
예제 #5
0
 public static IScope <TYPELIBATTR> CreateAttrScope(this ITypeLib typeLib)
 {
     return(StructHelpers.CreateScope <TYPELIBATTR>(typeLib.GetLibAttr, typeLib.ReleaseTLibAttr));
 }