Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. COM Interop Attributes

COM Interop Attributes

Scheduled Pinned Locked Moved Visual Basic
comquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jim Taylor
    wrote on last edited by
    #1

    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

    M 1 Reply Last reply
    0
    • J Jim Taylor

      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

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      The default is visible. If you want to hide something, use System.Runtime.InteropServices.ComVisibleAttribute like so:

      <ComVisible(False)> _
      Public Class MyClass

      End 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.

      J 1 Reply Last reply
      0
      • M Mike Dimmick

        The default is visible. If you want to hide something, use System.Runtime.InteropServices.ComVisibleAttribute like so:

        <ComVisible(False)> _
        Public Class MyClass

        End 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.

        J Offline
        J Offline
        Jim Taylor
        wrote on last edited by
        #3

        Thats great, thanks very much ;o) Jim

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups