COM Interop Attributes
-
How do I add attributes to an assembly that specify 1. That an assembly/class is visible/invisible to COM 2. That a method is visible/invisible to COM 3. That a property is visible/invisible to COM Jim
-
How do I add attributes to an assembly that specify 1. That an assembly/class is visible/invisible to COM 2. That a method is visible/invisible to COM 3. That a property is visible/invisible to COM Jim
The default is visible. If you want to hide something, use
System.Runtime.InteropServices.ComVisibleAttribute
like so:<ComVisible(False)> _
Public Class MyClassEnd Class
The same syntax applies to methods and to properties. However, types are not registered with COM by default. To do so, check 'Register for COM Interop' in the project properties, or use
regasm.exe
. -
The default is visible. If you want to hide something, use
System.Runtime.InteropServices.ComVisibleAttribute
like so:<ComVisible(False)> _
Public Class MyClassEnd Class
The same syntax applies to methods and to properties. However, types are not registered with COM by default. To do so, check 'Register for COM Interop' in the project properties, or use
regasm.exe
.Thats great, thanks very much ;o) Jim