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. Managed in Unmanaged

Managed in Unmanaged

Scheduled Pinned Locked Moved Visual Basic
csharpworkspace
6 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.
  • N Offline
    N Offline
    nitin_ion
    wrote on last edited by
    #1

    Can i call a dll made in .net in vb6. My point is that we cannot call code written in managed environment(.net) in unmanaged code(vb6,c etc). Am i correct or is there a way to call managed code in unmanaged env.

    N N D 3 Replies Last reply
    0
    • N nitin_ion

      Can i call a dll made in .net in vb6. My point is that we cannot call code written in managed environment(.net) in unmanaged code(vb6,c etc). Am i correct or is there a way to call managed code in unmanaged env.

      N Offline
      N Offline
      nitin_ion
      wrote on last edited by
      #2

      i've been able to refer the dll in the vb6 project.

      1 Reply Last reply
      0
      • N nitin_ion

        Can i call a dll made in .net in vb6. My point is that we cannot call code written in managed environment(.net) in unmanaged code(vb6,c etc). Am i correct or is there a way to call managed code in unmanaged env.

        N Offline
        N Offline
        Nicholas Cardi
        wrote on last edited by
        #3

        The following artical is all you need http://samples.gotdotnet.com/quickstart/howto/doc/Interop/Building_Samples_COM2NET.aspx[^] Forever Developing

        N 1 Reply Last reply
        0
        • N nitin_ion

          Can i call a dll made in .net in vb6. My point is that we cannot call code written in managed environment(.net) in unmanaged code(vb6,c etc). Am i correct or is there a way to call managed code in unmanaged env.

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Nothing could be further from the truth. There is nothing stopping you from creating a component in managed code and calling it from unmanaged code. Exposing .NET Framework Components to COM[^] RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          N 1 Reply Last reply
          0
          • N Nicholas Cardi

            The following artical is all you need http://samples.gotdotnet.com/quickstart/howto/doc/Interop/Building_Samples_COM2NET.aspx[^] Forever Developing

            N Offline
            N Offline
            nitin_ion
            wrote on last edited by
            #5

            I first created a type library of the ,net project and then registered the assembly by using regasm. Then i refered the library to the vb6 project. then when i tried to create an object of the library first it gave me this error "MSCOREE.DLL have been loaded" firts copy unknown second copy c:\windows\.....\mscorwks.dll this is typically caused by having a registered mscoree.dll that is different from the one that is statically linked with the application and the next error that follows "cannot create a file when that file already exists" i ran that project again and then i start recieveing these messages "ActiveX component can't create object" which is understandable. But when i tried to register the dll with regsvr32 cmd it again gave me error "Dll was loaded but DllregisterServer entry point was not found. The file cannot be registered." Am i doing something wrong?

            1 Reply Last reply
            0
            • D Dave Kreskowiak

              Nothing could be further from the truth. There is nothing stopping you from creating a component in managed code and calling it from unmanaged code. Exposing .NET Framework Components to COM[^] RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

              N Offline
              N Offline
              nitin_ion
              wrote on last edited by
              #6

              I first created a type library of the ,net project and then registered the assembly by using regasm. Then i refered the library to the vb6 project. then when i tried to create an object of the library first it gave me this error "MSCOREE.DLL have been loaded" first copy unknown second copy c:\windows\.....\mscorwks.dll this is typically caused by having a registered mscoree.dll that is different from the one that is statically linked with the application and the next error that follows "cannot create a file when that file already exists" i ran that project again and then i start recieveing these messages "ActiveX component can't create object" which is understandable. But when i tried to register the dll with regsvr32 cmd it again gave me error "Dll was loaded but DllregisterServer entry point was not found. The file cannot be registered." Am i doing something wrong?

              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