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. Add a dll in vb6

Add a dll in vb6

Scheduled Pinned Locked Moved Visual Basic
csharphelptutorial
13 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.
  • T toxcct

    VB 6 is NOT VB .NET


    TOXCCT >>> GEII power
    [toxcct][VisualCalc]

    R Offline
    R Offline
    Rizwan Bashir
    wrote on last edited by
    #4

    hahahaha.. thanks for a valueable information ... I suggested was for vb6.... So try as I am talking about vb6.

    T 1 Reply Last reply
    0
    • R Rizwan Bashir

      hahahaha.. thanks for a valueable information ... I suggested was for vb6.... So try as I am talking about vb6.

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #5

      "did you try to add the reference in vb.net..." didn't know you were talking about VB6:confused:


      TOXCCT >>> GEII power
      [toxcct][VisualCalc]

      R 1 Reply Last reply
      0
      • T toxcct

        "did you try to add the reference in vb.net..." didn't know you were talking about VB6:confused:


        TOXCCT >>> GEII power
        [toxcct][VisualCalc]

        R Offline
        R Offline
        Rizwan Bashir
        wrote on last edited by
        #6

        you missed two words from my quoted sentence "As well" let me put the complete sentence again did you try to add the reference in vb.net as all I guess you need a forum for English Grammer as well. note::: dont miss as well in the above line Search for that..

        T 1 Reply Last reply
        0
        • R Rizwan Bashir

          you missed two words from my quoted sentence "As well" let me put the complete sentence again did you try to add the reference in vb.net as all I guess you need a forum for English Grammer as well. note::: dont miss as well in the above line Search for that..

          T Offline
          T Offline
          toxcct
          wrote on last edited by
          #7

          :laugh::laugh::laugh: well tried (ps: if you spoke english better first, there would be no problem of understanding you b****)


          TOXCCT >>> GEII power
          [toxcct][VisualCalc]

          1 Reply Last reply
          0
          • I Its due when

            Hi All, Ive got a third party program that im trying to use in vb6. However it references a dll that cant be found (well its there but I dont know how to add it to the project) Debugging highlights this bit of code: ab = dll_ss12_dosomething( _ ab1, _ ab2, _ ab3) I know which dll to call as it is an app specific dll but I dont know how to reference it correctly in vb6. There are tons of examples on how to do it in vb.net and even the support manual shows how to do this in vb.net but not vb6. Oh and vb6 is supported by this app. Any help would be greatly appreciated. Thanks! Nic:confused:

            R Offline
            R Offline
            rwestgraham
            wrote on last edited by
            #8

            If you do not call a DLL directly in VB6 you do not need to reference the DLL in VB6. If your main DLL requires a second DLL that you never call explicitly, this is not a VB6 problem. Either the DLL is not registered properly if it is a COM DLL, or it is either corrupt, not the correct version, or not installed to the correct location if it is a standard DLL. The first step in solving your problem is to determine if the "missing" DLL is a COM component. If it is, make sure it is registered properly. Beyond that, your information is too vague to be of much use. If it is a third party package, try contacting the people who created it. Robert

            I 1 Reply Last reply
            0
            • R rwestgraham

              If you do not call a DLL directly in VB6 you do not need to reference the DLL in VB6. If your main DLL requires a second DLL that you never call explicitly, this is not a VB6 problem. Either the DLL is not registered properly if it is a COM DLL, or it is either corrupt, not the correct version, or not installed to the correct location if it is a standard DLL. The first step in solving your problem is to determine if the "missing" DLL is a COM component. If it is, make sure it is registered properly. Beyond that, your information is too vague to be of much use. If it is a third party package, try contacting the people who created it. Robert

              I Offline
              I Offline
              Its due when
              wrote on last edited by
              #9

              Thanks for that guys. I guess my vagueness is attributed to the fact that vb6 is not my strong point. Its not a COM DLL. From my understanding there are 2 steps required for using a dll. (1) The declare statement passing arguments byVal and (2) Calling the DLL procedure. Now Ive done the Declare statement correctly but when I actually call the dll in the code it comes up with a run time error "53": File not found (ss12.dll) Now what Im assuming is that there must be a way to map a path to this dll? Am I right in assuming this? Once again I thank you all for assisting me with this. Nic

              R 1 Reply Last reply
              0
              • I Its due when

                Thanks for that guys. I guess my vagueness is attributed to the fact that vb6 is not my strong point. Its not a COM DLL. From my understanding there are 2 steps required for using a dll. (1) The declare statement passing arguments byVal and (2) Calling the DLL procedure. Now Ive done the Declare statement correctly but when I actually call the dll in the code it comes up with a run time error "53": File not found (ss12.dll) Now what Im assuming is that there must be a way to map a path to this dll? Am I right in assuming this? Once again I thank you all for assisting me with this. Nic

                R Offline
                R Offline
                rwestgraham
                wrote on last edited by
                #10

                Unfortunately calling non-COM dlls is not that simple. ByVal is not a general rule by any means, many if not even most parameters must be passed ByRef. Also, you have to translate some C/C++ types into VB-friendly data types. Many types commonly used in C/C++ can be translated into VB types but not all. There is no guarantee that you can call all functions exposed by a non-COM DLL. Writing proper Declare statements is part experience, part trial and error. Save your work frequently - improperly declared DLL calls can often cause your application to crash. There are rules that Windows uses to locate DLLs. Generally if you put the DLL in either the application folder or the WinSys folder, it will be found. Robert

                I 1 Reply Last reply
                0
                • R rwestgraham

                  Unfortunately calling non-COM dlls is not that simple. ByVal is not a general rule by any means, many if not even most parameters must be passed ByRef. Also, you have to translate some C/C++ types into VB-friendly data types. Many types commonly used in C/C++ can be translated into VB types but not all. There is no guarantee that you can call all functions exposed by a non-COM DLL. Writing proper Declare statements is part experience, part trial and error. Save your work frequently - improperly declared DLL calls can often cause your application to crash. There are rules that Windows uses to locate DLLs. Generally if you put the DLL in either the application folder or the WinSys folder, it will be found. Robert

                  I Offline
                  I Offline
                  Its due when
                  wrote on last edited by
                  #11

                  Hi Robert, Thank you for your reply. I tried putting the dll in question into the application folder (I assume this is the folder in which the vb project resides in?) - Unfortunately again it says that the dll could not be found. Now when you say WinSys folder do you mean the system/system32 folder in the windows directory? I tried putting them in both folders but unfortunately again no go - File not found: Run time error 53 Any other thoughts?

                  R 1 Reply Last reply
                  0
                  • I Its due when

                    Hi Robert, Thank you for your reply. I tried putting the dll in question into the application folder (I assume this is the folder in which the vb project resides in?) - Unfortunately again it says that the dll could not be found. Now when you say WinSys folder do you mean the system/system32 folder in the windows directory? I tried putting them in both folders but unfortunately again no go - File not found: Run time error 53 Any other thoughts?

                    R Offline
                    R Offline
                    rwestgraham
                    wrote on last edited by
                    #12

                    Post the exact name of your DLL, and an example of your declare statement in VB and I will look at it. If you wish you can e-mail me the DLL itself too - rwest_graham@yahoo.com Robert

                    I 1 Reply Last reply
                    0
                    • R rwestgraham

                      Post the exact name of your DLL, and an example of your declare statement in VB and I will look at it. If you wish you can e-mail me the DLL itself too - rwest_graham@yahoo.com Robert

                      I Offline
                      I Offline
                      Its due when
                      wrote on last edited by
                      #13

                      Hi Robert, Thanks for your help but I actually worked it out. It couldnt find the dll cause the system path did not have the dir to the dll location at all. I put it in and it worked like a treat. By system path I mean if you go into the properties of my computer and then onto environment variables you can specify the path where dll's are stored and if you do this it works. Once again I thank you and all who posted for your help. Great help -> Great Forum :-D Nic

                      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