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. How to use DLLs

How to use DLLs

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

    Hello, I need to use a dll file (that I downloaded from the net) in my MFC VC++ application, but I am new to dll's and VC++ and don't know where to start. I was hoping that someone knew of a document that I could read that would show me how to do this. Thanks, Aoife

    S T R 3 Replies Last reply
    0
    • A Aoife

      Hello, I need to use a dll file (that I downloaded from the net) in my MFC VC++ application, but I am new to dll's and VC++ and don't know where to start. I was hoping that someone knew of a document that I could read that would show me how to do this. Thanks, Aoife

      S Offline
      S Offline
      Sameer Maggon
      wrote on last edited by
      #2

      What kind of a DLL you have downloaded, and how do you intend to use that..

      1 Reply Last reply
      0
      • A Aoife

        Hello, I need to use a dll file (that I downloaded from the net) in my MFC VC++ application, but I am new to dll's and VC++ and don't know where to start. I was hoping that someone knew of a document that I could read that would show me how to do this. Thanks, Aoife

        T Offline
        T Offline
        Tom Archer
        wrote on last edited by
        #3

        Typically, the DLL is going to come with a header file and an import library. 1) Simply include the header file where you need to - either in the file that will be references any of the DLL's exported types or functions) or in the stdafx.h file 2) Add the import library to the project. 3) Place the DLL in one of the following folders (This is the order windows searches for DLLs) The current folder The Windows folder The Windows system folder The folder where the main application is being run from The folders listed in the PATH environment variable A mapped network folders Let me know if you need any more help. Cheers, Tom Archer Author, Inside C# Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.

        1 Reply Last reply
        0
        • A Aoife

          Hello, I need to use a dll file (that I downloaded from the net) in my MFC VC++ application, but I am new to dll's and VC++ and don't know where to start. I was hoping that someone knew of a document that I could read that would show me how to do this. Thanks, Aoife

          R Offline
          R Offline
          Ravi Bhavnani
          wrote on last edited by
          #4

          If the DLL doesn't come with an import lib, you can get at an exported function by using GetProcAddress(). However, you'll still need a .h file that describes the function's prototype. /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com

          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