protected Type GetTypeFromTypeLib(TypeLibrary typeLib)
        {
            if (typeLib == null)
            {
                _typeFailedException =
                    new Exception("Unable to determine TypeLib "
                                  + "from CLSID: " + _guidStr);
                throw _typeFailedException;
            }

            // Set this information because we might have read the
            // class from a source other than the type library
            _container = typeLib;
            _typeLib   = typeLib;

            // Get the type associated with the CLSId from the typelib
            if (Name == null)
            {
                ComClassInfo clsInfo = typeLib.GetClassInfoFromCLSID(_guid);
                Name = clsInfo.Name;
            }

            Type type = typeLib.FindTypeByName(Name,
                                               TypeLibrary.FIND_CLASS);

            if (type == null)
            {
                _typeFailedException =
                    new Exception("CLR type not found in "
                                  + _container
                                  + " for ActiveX type "
                                  + this
                                  + ".\n\nThis is likely caused by "
                                  + "the assembly corresponding to "
                                  + "this type library not being "
                                  + "available.");
                throw _typeFailedException;
            }

            if (TraceUtil.If(this, TraceLevel.Info))
            {
                Trace.WriteLine("ComClassInfo - type: " + type);
            }
            return(type);
        }