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. Using .dll's created in Visual C++ in VB [both forums]

Using .dll's created in Visual C++ in VB [both forums]

Scheduled Pinned Locked Moved Visual Basic
c++tutorialcsharpcom
4 Posts 4 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.
  • D Offline
    D Offline
    dazinith
    wrote on last edited by
    #1

    hey guys, I am trying to get an idea of how I can write functions in C++ which can be used by visual basic 6 programmers.. anyone have any suggestions on where to get started? i have seen how dlls work looking at the introduction to com article, but that dll doesnt seem to work in vb, keeps giving me 'can't fint dll entry point' errors.. im also considering switching to c#, is it easier to write dlls in c# that to learn how to in c++? if i could just have one example that would work in vb that would help so much.. anyone got any links? thanks a bunch! still a newb.. cut me some slack :P -dz

    H N D 3 Replies Last reply
    0
    • D dazinith

      hey guys, I am trying to get an idea of how I can write functions in C++ which can be used by visual basic 6 programmers.. anyone have any suggestions on where to get started? i have seen how dlls work looking at the introduction to com article, but that dll doesnt seem to work in vb, keeps giving me 'can't fint dll entry point' errors.. im also considering switching to c#, is it easier to write dlls in c# that to learn how to in c++? if i could just have one example that would work in vb that would help so much.. anyone got any links? thanks a bunch! still a newb.. cut me some slack :P -dz

      H Offline
      H Offline
      Hesham Amin
      wrote on last edited by
      #2

      use ATL library to create a com component and register it.. from VB instanciate an object of this component..ATL has minimum dependencies... if you want to call the function using (Declare) as you do with API functions..you need to export the C++ functions using a *.def file LIBRARY LibName //Your dll library name. EXPORTS MakeFile @1 //function name and an optional ordinal position or See this : http://www.codeguru.com/forum/showthread.php?s=&threadid=225783

      1 Reply Last reply
      0
      • D dazinith

        hey guys, I am trying to get an idea of how I can write functions in C++ which can be used by visual basic 6 programmers.. anyone have any suggestions on where to get started? i have seen how dlls work looking at the introduction to com article, but that dll doesnt seem to work in vb, keeps giving me 'can't fint dll entry point' errors.. im also considering switching to c#, is it easier to write dlls in c# that to learn how to in c++? if i could just have one example that would work in vb that would help so much.. anyone got any links? thanks a bunch! still a newb.. cut me some slack :P -dz

        N Offline
        N Offline
        Nick Parker
        wrote on last edited by
        #3

        dazinith wrote: anyone have any suggestions on where to get started? The best article that I found if you are strictly going from C++ to VB 6.0 is Calling a C++ DLL from Visual Basic - Introduction[^] dazinith wrote: im also considering switching to c#, is it easier to write dlls in c# that to learn how to in c++? There are many options if you choose to work with .NET. Keep in mind that the .dll's that are created under .NET are assemblies, different than what what VC++ 6.0 would produce as a .dll even though they share the same file extension. -Nick Parker

        1 Reply Last reply
        0
        • D dazinith

          hey guys, I am trying to get an idea of how I can write functions in C++ which can be used by visual basic 6 programmers.. anyone have any suggestions on where to get started? i have seen how dlls work looking at the introduction to com article, but that dll doesnt seem to work in vb, keeps giving me 'can't fint dll entry point' errors.. im also considering switching to c#, is it easier to write dlls in c# that to learn how to in c++? if i could just have one example that would work in vb that would help so much.. anyone got any links? thanks a bunch! still a newb.. cut me some slack :P -dz

          D Offline
          D Offline
          Daniel Turini
          wrote on last edited by
          #4

          dazinith wrote: still a newb.. cut me some slack I'll take this is consideration when answering your questions: dazinith wrote: hey guys, I am trying to get an idea of how I can write functions in C++ which can be used by visual basic 6 programmers.. There are several ways: the simplest form is creating a COM DLL. Not too easy for a newbie, though. dazinith wrote: im also considering switching to c#, is it easier to write dlls in c# that to learn how to in c++? Yes, much simpler: You only need to create a library project, create a class, and in project properties, you set "Register for COM interop" as true. Your DLL is now ready to go in VB 6. There are step-by-step tutorials about this on CP which show how to do this in greater detail, but this is the general procedure.


          It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)

          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