Пример #1
0
        private static FilterWrapper LoadFilterFromDll(string dllName, string filterPersistClass)
        {
            //Get a classFactory for our classID
            ClassFactoryWrapper classFactory = ComHelper.GetClassFactory(dllName, filterPersistClass);

            if (classFactory == null)
            {
                return(null);
            }

            object obj;
            //And create an IFilter instance using that class factory
            Guid filterGuid = new Guid("89BCB740-6119-101A-BCB7-00DD010655AF");

            classFactory.ClassFactory.CreateInstance(null, ref filterGuid, out obj);

            if (obj as IFilter == null)
            {
                using (classFactory)
                    return(null);
            }

            return(new FilterWrapper(classFactory, obj as IFilter));
        }
Пример #2
0
		public FilterWrapper(ClassFactoryWrapper classFactoryWrapper, IFilter filter)
		{
			m_ClassFactoryWrapper = classFactoryWrapper;
			Filter = filter;
		}
Пример #3
0
 public FilterWrapper(ClassFactoryWrapper classFactoryWrapper, IFilter filter)
 {
     m_ClassFactoryWrapper = classFactoryWrapper;
     Filter = filter;
 }