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 / C++ / MFC
  4. Integrate dll with vc++ application

Integrate dll with vc++ application

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorial
7 Posts 5 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.
  • F Offline
    F Offline
    FutureSE
    wrote on last edited by
    #1

    how to call or integrate DLL within vc++ application. I have developed one vc++ application now i want to integrate one tool into this application which ll cal this DLL. reply soon thanx FutureSE

    N _ L I 4 Replies Last reply
    0
    • F FutureSE

      how to call or integrate DLL within vc++ application. I have developed one vc++ application now i want to integrate one tool into this application which ll cal this DLL. reply soon thanx FutureSE

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

      You can: 1) Load programmatically the DLL using LoadLibrary(). In this case you have to load the functions entry points the dll exports via GetProcAddr() 2) Usually DLLs come with a LIB file. Include the LIB file into your project. The functions exported by the DLL are now available. 3)Use the delay loading feature with the /delayload:dllname linker switch

      1 Reply Last reply
      0
      • F FutureSE

        how to call or integrate DLL within vc++ application. I have developed one vc++ application now i want to integrate one tool into this application which ll cal this DLL. reply soon thanx FutureSE

        _ Offline
        _ Offline
        _AnsHUMAN_
        wrote on last edited by
        #3

        Use CoCreateInstance() You should know how to invoke a COM and work with COM objects.This applies when you have the class id of the interface. else You can also use LoadLibrary() alongwith GetProcAddress() to invoke the functions Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_ -- modified at 6:18 Tuesday 13th June, 2006

        1 Reply Last reply
        0
        • F FutureSE

          how to call or integrate DLL within vc++ application. I have developed one vc++ application now i want to integrate one tool into this application which ll cal this DLL. reply soon thanx FutureSE

          L Offline
          L Offline
          Laxman Auti
          wrote on last edited by
          #4

          FutureSE wrote:

          how to call or integrate DLL within vc++ application. I have developed one vc++ application now i want to integrate one tool into this application which ll cal this DLL. reply soon

          Try GetModuleHandle which returns the handle of your DLL through which you can get the addresses of the method using GetProcAddress.. The GetProcAddress Fails when the method is Mangled (in case of C++ Dll). Knock out 't' from can't, You can if you think you can :cool:

          F 1 Reply Last reply
          0
          • L Laxman Auti

            FutureSE wrote:

            how to call or integrate DLL within vc++ application. I have developed one vc++ application now i want to integrate one tool into this application which ll cal this DLL. reply soon

            Try GetModuleHandle which returns the handle of your DLL through which you can get the addresses of the method using GetProcAddress.. The GetProcAddress Fails when the method is Mangled (in case of C++ Dll). Knock out 't' from can't, You can if you think you can :cool:

            F Offline
            F Offline
            FutureSE
            wrote on last edited by
            #5

            ok i ll try tht n get back to u FutureSE WhiteHawk

            L 1 Reply Last reply
            0
            • F FutureSE

              how to call or integrate DLL within vc++ application. I have developed one vc++ application now i want to integrate one tool into this application which ll cal this DLL. reply soon thanx FutureSE

              I Offline
              I Offline
              idlidosa
              wrote on last edited by
              #6

              in project setting , under link tab give reference to the .lib file, give its path. in your program add the header file.. header file should have __declspec (dllimport) not __declspec (dllexport) go get going.

              1 Reply Last reply
              0
              • F FutureSE

                ok i ll try tht n get back to u FutureSE WhiteHawk

                L Offline
                L Offline
                Laxman Auti
                wrote on last edited by
                #7

                Good luck. :) Knock out 't' from can't, You can if you think you can :cool:

                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