internal COMCLSIDEntry(COMRegistry registry, Guid clsid, COMPackagedEntry packageEntry, COMPackagedClassEntry classEntry) : this(registry, clsid) { Source = COMRegistryEntrySource.Packaged; Name = classEntry.DisplayName; PackageId = packageEntry.PackageId; Dictionary <COMServerType, COMCLSIDServerEntry> servers = new Dictionary <COMServerType, COMCLSIDServerEntry>(); if (!string.IsNullOrWhiteSpace(classEntry.DllPath)) { servers.Add(COMServerType.InProcServer32, new COMCLSIDServerEntry(COMServerType.InProcServer32, classEntry.DllPath, classEntry.Threading)); } if (packageEntry.Servers.ContainsKey(classEntry.ServerId)) { COMPackagedServerEntry server = packageEntry.Servers[classEntry.ServerId]; AppID = server.SurrogateAppId; string serverPath = "<APPID HOSTED>"; string commandLine = string.Empty; if (AppID == Guid.Empty) { serverPath = server.Executable; commandLine = server.CommandLine; } servers.Add(COMServerType.LocalServer32, new COMCLSIDServerEntry(COMServerType.LocalServer32, serverPath, commandLine)); } Servers = new ReadOnlyDictionary <COMServerType, COMCLSIDServerEntry>(servers); Categories = classEntry.ImplementedCategories.AsReadOnly(); }
internal COMAppIDEntry(COMPackagedServerEntry server, COMRegistry registry) : this(registry) { AppId = server.SurrogateAppId; RunAs = string.Empty; Name = server.DisplayName; LaunchPermission = server.LaunchAndActivationPermission; AccessPermission = string.Empty; Source = COMRegistryEntrySource.Packaged; DllSurrogate = server.Executable; if (string.IsNullOrWhiteSpace(DllSurrogate)) { DllSurrogate = "dllhost.exe"; } }