internal COMInterfaceEntry(COMRegistry registry, ActCtxComInterfaceRedirection intf_redirection) : this(registry, intf_redirection.Iid, intf_redirection.ProxyStubClsid32, intf_redirection.NumMethods, string.Empty, intf_redirection.Name) { TypeLib = intf_redirection.TypeLibraryId; Source = COMRegistryEntrySource.ActCtx; }
public DynamicComObjectWrapper(COMRegistry registry, Type instanceType, object entry) { _registry = registry; if (instanceType == null) { throw new ArgumentNullException("instanceType"); } if (entry == null) { throw new ArgumentNullException("entry"); } if (!COMUtilities.IsComImport(instanceType)) { throw new ArgumentException("Interface type must be an imported COM type"); } if (!Marshal.IsComObject(entry)) { throw new ArgumentException("Target must be a COM object"); } _methods = instanceType.GetMethods().Where(m => !m.IsSpecialName).ToDictionary(m => m.Name); _properties = instanceType.GetProperties().ToDictionary(m => m.Name); _target = entry; _instanceType = instanceType; }
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(); }
private COMCLSIDEntry(COMRegistry registry, Guid clsid) : this(registry) { Clsid = clsid; Servers = new Dictionary <COMServerType, COMCLSIDServerEntry>(); Name = string.Empty; Categories = new Guid[0]; PackageId = string.Empty; }
internal COMProgIDEntry(COMRegistry registry, string progid, Guid clsid, COMPackagedClassEntry classEntry) : this(registry) { Clsid = clsid; ProgID = progid; Name = classEntry.DisplayName; Source = COMRegistryEntrySource.Packaged; }
public COMRuntimeServerEntry(COMRegistry registry, string package_id, string name, RegistryKey rootKey) : this(registry) { Name = name; PackageId = package_id ?? string.Empty; LoadFromKey(rootKey); Source = rootKey.GetSource(); }
public COMTypeLibVersionEntry(COMRegistry registry, ActCtxComTypeLibraryRedirection typelib_redirection) : this(registry, typelib_redirection.TypeLibraryId) { Name = TypelibId.FormatGuid(); Win32Path = typelib_redirection.FullPath; Win64Path = typelib_redirection.FullPath; Source = COMRegistryEntrySource.ActCtx; }
internal COMProgIDEntry(COMRegistry registry, ActCtxComProgIdRedirection progid_redirection) { Clsid = progid_redirection.Clsid; ProgID = progid_redirection.ProgId; Name = ProgID; Source = COMRegistryEntrySource.ActCtx; }
public COMIELowRightsElevationPolicy(COMRegistry registry, Guid guid, COMRegistryEntrySource source, RegistryKey key) : this(registry) { Uuid = guid; Name = Uuid.FormatGuidDefault(); Source = source; LoadFromRegistry(key); }
public COMProgIDEntry(COMRegistry registry, string progid, Guid clsid, RegistryKey rootKey) : this(registry) { Clsid = clsid; ProgID = progid; Name = rootKey.GetValue(null, string.Empty).ToString(); Source = rootKey.GetSource(); }
internal COMRuntimeClassEntry(COMRegistry registry, string package_id, string name) : this(registry) { Name = name; DllPath = string.Empty; Server = string.Empty; Permissions = string.Empty; PackageId = package_id ?? string.Empty; }
public ClassFactoryTypeViewer(COMRegistry registry, ICOMClassEntry entry, string objName, object obj) { InitializeComponent(); _obj = obj; _name = objName; _registry = registry; _entry = entry; Text = objName + " ClassFactory"; }
public void Stop() { lock (this) { _registry = null; _writer?.Dispose(); _writer = null; } }
public void Start(string path, bool append, COMRegistry registry) { lock (this) { Stop(); _writer = new StreamWriter(path, append); _registry = registry; } }
internal COMRuntimeExtensionEntry(string package_id, string contract_id, string id, RegistryKey key, COMRegistry registry) : this(registry) { PackageId = package_id; ContractId = contract_id; AppId = id; LoadFromKey(key); Source = key.GetSource(); }
public static object Wrap(COMRegistry registry, object o, Type objType) { if ((o != null) && !(o is DynamicComObjectWrapper) && COMUtilities.IsComImport(objType)) { return(new DynamicComObjectWrapper(registry, objType, o)); } return(o); }
private COMInterfaceEntry(COMRegistry registry, Guid iid, Guid proxyclsid, int nummethods, string baseName, string name) : this(registry) { Iid = iid; ProxyClsid = proxyclsid; NumMethods = nummethods; Base = baseName; Name = name; TypeLibVersion = string.Empty; }
internal COMTypeLibVersionEntry(COMRegistry registry, Guid typelibid, COMPackagedTypeLibVersionEntry entry) : this(registry, typelibid) { Version = entry.Version; Locale = entry.LocaleId; Name = entry.DisplayName; Win32Path = entry.Win32Path; Win64Path = entry.Win64Path; Source = COMRegistryEntrySource.Packaged; }
public InvokeForm(COMRegistry registry, MethodInfo mi, object pObject, string objName) { m_mi = mi; m_pObject = pObject; m_objName = objName; m_registry = registry; LoadParameters(); InitializeComponent(); }
public override Control CreateInstance(COMRegistry registry, ICOMClassEntry entry, string strObjName, ObjectEntry pObject) { COMCLSIDEntry clsid_entry = entry as COMCLSIDEntry; if (clsid_entry == null) { throw new ArgumentException("Entry must be a COM class", "entry"); } return(new ElevatedFactoryServerTypeViewer(registry, clsid_entry, strObjName, pObject.Instance)); }
internal COMTypeLibEntry(COMRegistry registry, ActCtxComTypeLibraryRedirection typelib_redirection) : this(registry) { TypelibId = typelib_redirection.TypeLibraryId; Name = TypelibId.FormatGuid(); List <COMTypeLibVersionEntry> versions = new List <COMTypeLibVersionEntry>(); versions.Add(new COMTypeLibVersionEntry(registry, typelib_redirection)); Versions = versions.AsReadOnly(); Source = COMRegistryEntrySource.ActCtx; }
internal COMCLSIDEntry(COMRegistry registry, ActCtxComServerRedirection com_server) : this(registry, com_server.Clsid) { Clsid = com_server.Clsid; TypeLib = com_server.TypeLibraryId; Servers[COMServerType.InProcServer32] = new COMCLSIDServerEntry(COMServerType.InProcServer32, com_server.FullPath, com_server.ThreadingModel); Name = string.IsNullOrWhiteSpace(com_server.ProgId) ? Clsid.ToString() : com_server.ProgId; Source = COMRegistryEntrySource.ActCtx; }
internal COMInterfaceEntry(COMRegistry registry, COMPackagedInterfaceEntry entry) : this(registry, entry.Iid, entry.ProxyStubCLSID, 3, "IUnknown", entry.Iid.FormatGuidDefault()) { if (entry.UseUniversalMarshaler) { ProxyClsid = new Guid("00020424-0000-0000-C000-000000000046"); } TypeLib = entry.TypeLibId; TypeLibVersion = entry.TypeLibVersionNumber; Source = COMRegistryEntrySource.Packaged; }
public TypeLibControl(COMRegistry registry, string name, COMProxyInstance proxy, Guid guid_to_view, string comClassIdName = null, Guid?comClassId = null) : this(registry.InterfacesToNames, name, guid_to_view, FormatProxyInstance(proxy), new ListViewItemWithGuid[0], FormatProxyInstanceComplexTypes(proxy), new ListViewItem[0]) { // controls on this panel are not enabled by default, activating them in the proxy view only this.btnDqs.Enabled = true; this.cbProxyRenderStyle.Enabled = true; this.comClassId = comClassId; this.comClassIdName = comClassIdName; }
/// <summary> /// Constructor /// </summary> /// <param name="strObjName">Descriptive name of the object</param> /// <param name="pEntry">Instance of the object</param> /// <param name="dispType">Reflected type</param> public TypedObjectViewer(COMRegistry registry, string strObjName, ObjectEntry pEntry, Type dispType) { m_pEntry = pEntry; m_pObject = pEntry.Instance; m_objName = strObjName; m_dispType = dispType; m_registry = registry; InitializeComponent(); LoadDispatch(); Text = string.Format("{0} {1}", m_objName, m_dispType.Name); }
internal COMMimeType(COMRegistry registry, string mime_type, RegistryKey key) : this(registry) { string clsid = key.GetValue("CLSID") as string; string extension = key.GetValue("Extension") as string; Guid guid; if ((clsid != null) && Guid.TryParse(clsid, out guid)) { Clsid = guid; } Extension = extension; MimeType = mime_type; }
private static COMInterfaceEntry CreateBuiltinEntry(COMRegistry registry, Guid iid, string name, int num_methods) { return(new COMInterfaceEntry(registry) { Base = "", Iid = iid, ProxyClsid = Guid.Empty, NumMethods = num_methods, Name = name, TypeLibVersion = string.Empty, Source = COMRegistryEntrySource.Builtin }); }
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"; } }
public ObjectHexEditor(COMRegistry registry, string name, byte[] bytes) { InitializeComponent(); hexEditor.Bytes = bytes; if (name != null) { Text = name; } else { Text = "Hex Editor"; } m_registry = registry; }
public CustomMarshalEditorControl(COMRegistry registry, COMObjRefCustom objref) { m_objref = objref; m_registry = registry; InitializeComponent(); textBoxClsid.Text = objref.Clsid.FormatGuid(); COMCLSIDEntry ent = registry.MapClsidToEntry(objref.Clsid); if (ent != null) { textBoxName.Text = ent.Name; } hexEditor.Bytes = objref.ObjectData; }