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. C#
  4. Dlls

Dlls

Scheduled Pinned Locked Moved C#
csharp
3 Posts 3 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
    jithen_dt
    wrote on last edited by
    #1

    I want to make use of dlls created in .Net in vb6 is it possible Every thing is MAYA

    H S 2 Replies Last reply
    0
    • J jithen_dt

      I want to make use of dlls created in .Net in vb6 is it possible Every thing is MAYA

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Yes, so long as they expose CCWs, or COM-Callable Wrappers (which is the best way, and VB6 is entirely built on OLE/COM anyway). See Nick's article, Creating a CCW for COM-enabled, non-.NET Applications[^], and read Exposing .NET Framework Components to COM[^] in the .NET Framework SDK. A few important things to note: explicitly define your class and interfaces GUIDs (using the GuidAttribute), and DO NOT use auto-generated class interfaces. Instead, attribute your class with ClassInterface(ClassInterfaceType.None) and explicitly declare your class interface and implement it as the first interface in the list of interfaces. Make sure you declare your interface as an automation interface by attributing your interface with InterfaceType(ComInterfaceType.InterfaceIsIDispatch) (or ComInterfaceType.InterfaceIsDual). Since VB6 depends on automation, declaring your interface as an IUnknown implementation won't work.

      Microsoft MVP, Visual C# My Articles

      1 Reply Last reply
      0
      • J jithen_dt

        I want to make use of dlls created in .Net in vb6 is it possible Every thing is MAYA

        S Offline
        S Offline
        scadaguy
        wrote on last edited by
        #3

        Yes. You'll need to use regasm.exe to register your assembly as a COM dll. Depending on what the public interface looks like you might have to decorate your code with attributes. There is a lot of information and examples on the web. You can also take advantage of COM+ services in the System.EnterpriseServices namespace.

        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