Exemple #1
0
 static bool TryGetComClassType(CLSID clsId, out ComAPI.IClassFactory factory)
 {
     // Check among the persistently registered classes
     foreach (ExcelComClassType comClass in registeredComClassTypes)
     {
         if (comClass.ClsId == clsId)
         {
             factory = new ClassFactory(comClass);
             return(true);
         }
     }
     factory = null;
     return(false);
 }
Exemple #2
0
 internal static void RegisterClassFactory(CLSID clsId, ComAPI.IClassFactory classFactory)
 {
     // CONSIDER: Do we need to deal with the case where it is already in the list?
     //           For now we expect it to throw...
     registeredClassFactories.Add(clsId, classFactory);
 }