internal static VirtualDesktopNotification CreateInstance(ComInterfaceAssembly assembly)
        {
            var type     = assembly.GetType("VirtualDesktopNotificationListener");
            var instance = (VirtualDesktopNotification)Activator.CreateInstance(type);

            return(instance);
        }
예제 #2
0
        private protected ComInterfaceWrapperBase(ComInterfaceAssembly assembly, string comInterfaceName = null, Guid?service = null)
        {
            var(type, instance) = assembly.CreateInstance(comInterfaceName ?? this.GetType().GetComInterfaceNameIfWrapper(), service);

            this.ComInterfaceAssembly = assembly;
            this.ComInterfaceType     = type;
            this.ComObject            = instance;
        }
예제 #3
0
        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.");
        }
예제 #4
0
 public ApplicationView(ComInterfaceAssembly assembly, object comObject, string comInterfaceName = null)
     : base(assembly, comObject, comInterfaceName)
 {
 }
예제 #5
0
 private protected ComInterfaceWrapperBase(ComInterfaceAssembly assembly, object comObject, string comInterfaceName = null)
 {
     this.ComInterfaceAssembly = assembly;
     this.ComInterfaceType     = assembly.GetType(comInterfaceName ?? this.GetType().GetComInterfaceNameIfWrapper());
     this.ComObject            = comObject;
 }
예제 #6
0
 public ComObjects(ComInterfaceAssembly assembly)
 {
     this._assembly = assembly;
     this.Initialize();
 }
 public ApplicationViewCollection(ComInterfaceAssembly assembly)
     : base(assembly)
 {
 }
 public VirtualDesktopManagerInternal21359(ComInterfaceAssembly assembly)
     : base(assembly)
 {
 }
예제 #9
0
 public VirtualDesktopPinnedApps(ComInterfaceAssembly assembly)
     : base(assembly, service: CLSID.VirtualDesktopPinnedApps)
 {
 }
예제 #10
0
 public VirtualDesktopManagerInternal(ComInterfaceAssembly assembly)
     : base(assembly, service: CLSID.VirtualDesktopAPIUnknown)
 {
 }
 public VirtualDesktopNotificationService(ComInterfaceAssembly assembly)
     : base(assembly, service: CLSID.VirtualDesktopNotificationService)
 {
 }
 public VirtualDesktopManagerInternal10240(ComInterfaceAssembly assembly)
     : base(assembly, latestVersion: 3)
 {
 }
 public VirtualDesktopManagerInternal(ComInterfaceAssembly assembly, uint latestVersion = 1)
     : base(assembly, "IVirtualDesktopManagerInternal", latestVersion, service: CLSID.VirtualDesktopAPIUnknown)
 {
 }