internal static VirtualDesktopNotification CreateInstance(ComInterfaceAssembly assembly) { var type = assembly.GetType("VirtualDesktopNotificationListener"); var instance = (VirtualDesktopNotification)Activator.CreateInstance(type); return(instance); }
private protected ComInterfaceWrapperBase(ComInterfaceAssembly assembly, object comObject, string comInterfaceName = null, uint latestVersion = 1) { var comInterfaceName2 = comInterfaceName ?? this.GetType().GetComInterfaceNameIfWrapper(); for (var version = latestVersion; version >= 1; version--) { var type = assembly.GetType(version != 1 ? $"{comInterfaceName2}{version}" : comInterfaceName2); if (type != null) { this.ComInterfaceAssembly = assembly; this.ComInterfaceType = type; this.ComObject = comObject; this.ComVersion = version; return; } } throw new InvalidOperationException($"{comInterfaceName2} or later version is not found."); }
private protected ComInterfaceWrapperBase(ComInterfaceAssembly assembly, object comObject, string comInterfaceName = null) { this.ComInterfaceAssembly = assembly; this.ComInterfaceType = assembly.GetType(comInterfaceName ?? this.GetType().GetComInterfaceNameIfWrapper()); this.ComObject = comObject; }