From 25d88b0609b34f46eb8c5249b2bb4742a2e90c32 Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 30 Nov 2019 19:15:06 +0000 Subject: [PATCH] Set global com visible to false and only exposed the classes that need to be. --- Meade.net.Telescope/Properties/AssemblyInfo.cs | 2 +- Meade.net.Telescope/Telescope.cs | 1 + Meade.net.focuser/Focuser.cs | 1 + Meade.net.focuser/Properties/AssemblyInfo.cs | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Meade.net.Telescope/Properties/AssemblyInfo.cs b/Meade.net.Telescope/Properties/AssemblyInfo.cs index ab1142a..4604c64 100644 --- a/Meade.net.Telescope/Properties/AssemblyInfo.cs +++ b/Meade.net.Telescope/Properties/AssemblyInfo.cs @@ -18,7 +18,7 @@ using System.Runtime.InteropServices; // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(true)] +[assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("8b9fccb9-87ae-42f7-90af-079e13de6efb")] diff --git a/Meade.net.Telescope/Telescope.cs b/Meade.net.Telescope/Telescope.cs index c77994f..67ad2b8 100644 --- a/Meade.net.Telescope/Telescope.cs +++ b/Meade.net.Telescope/Telescope.cs @@ -35,6 +35,7 @@ namespace ASCOM.Meade.net [ProgId("ASCOM.MeadeGeneric.Telescope")] [ServedClassName("Meade Generic")] [ClassInterface(ClassInterfaceType.None)] + [ComVisible(true)] public class Telescope : ReferenceCountedObjectBase, ITelescopeV3 { /// diff --git a/Meade.net.focuser/Focuser.cs b/Meade.net.focuser/Focuser.cs index 51787bf..e92e611 100644 --- a/Meade.net.focuser/Focuser.cs +++ b/Meade.net.focuser/Focuser.cs @@ -30,6 +30,7 @@ namespace ASCOM.Meade.net [ProgId("ASCOM.MeadeGeneric.focuser")] [ServedClassName("Meade Generic")] [ClassInterface(ClassInterfaceType.None)] + [ComVisible(true)] public class Focuser : ReferenceCountedObjectBase, IFocuserV3 { /// diff --git a/Meade.net.focuser/Properties/AssemblyInfo.cs b/Meade.net.focuser/Properties/AssemblyInfo.cs index 46c7ed0..d77e77d 100644 --- a/Meade.net.focuser/Properties/AssemblyInfo.cs +++ b/Meade.net.focuser/Properties/AssemblyInfo.cs @@ -18,7 +18,7 @@ using System.Runtime.InteropServices; // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(true)] +[assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("4ad7a6d4-6d54-4a9a-bbf3-895353e318f8")]