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. Loading .LIB file and .DLL into MFC App.

Loading .LIB file and .DLL into MFC App.

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestion
4 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.
  • E Offline
    E Offline
    E3
    wrote on last edited by
    #1

    Hi, Dose any body known how to load .DLL file into your project that have .LIB file also and creating an warpper for that file???

    P R 2 Replies Last reply
    0
    • E E3

      Hi, Dose any body known how to load .DLL file into your project that have .LIB file also and creating an warpper for that file???

      P Offline
      P Offline
      perlmunger
      wrote on last edited by
      #2

      Your question is difficult to understand, but I'll try to help. Loading a dll is something you do at run time. Using a .lib is something you do at compile time. It is a static library that gets linked in to your final application. If you are asking if it is possible to use both a dll and a .lib at the same time in the same project, then the answer is yes. Now, I have no idea what you mean by creating a wrapper "for that file". First of all, which file are you talking about? You want to create a wrapper for the .lib? That doesn't make any sense to me. When you write a wrapper for something, you are dealing with source code. When you use a .lib file you are dealing with a binary file. Can you re-phrase your question? -Matt ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

      E 1 Reply Last reply
      0
      • P perlmunger

        Your question is difficult to understand, but I'll try to help. Loading a dll is something you do at run time. Using a .lib is something you do at compile time. It is a static library that gets linked in to your final application. If you are asking if it is possible to use both a dll and a .lib at the same time in the same project, then the answer is yes. Now, I have no idea what you mean by creating a wrapper "for that file". First of all, which file are you talking about? You want to create a wrapper for the .lib? That doesn't make any sense to me. When you write a wrapper for something, you are dealing with source code. When you use a .lib file you are dealing with a binary file. Can you re-phrase your question? -Matt ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

        E Offline
        E Offline
        E3
        wrote on last edited by
        #3

        What i mean i create the wrapper for the DLL file I do have the code for that DLL file and the code is writin in C/Win32. Now i want to use this code in the MFC app with the MDI style so where CView it would display that object. Now i think think this is how i load the dll at run time HINSTANCE m_hInstDLL; if ((m_hInstDLL = LoadLibrary("name.dll")) == NULL) { return FALSE; // Failed to load the localized resources. } else { AfxSetResourceHandle(m_hInstDLL); // Get resources from the DLL. } Now after loading the DLL how do i use these function for the DLL? what else to i have to declare that where the wrapper come in. I want to have a class that controls all this functions. where abouts do i start. I hope you known what i'm trying to say. Then main think is that i want to display the control in CView window or is it called CDocument window...but you known what i'm taking about here. Thanks for the help Matt

        1 Reply Last reply
        0
        • E E3

          Hi, Dose any body known how to load .DLL file into your project that have .LIB file also and creating an warpper for that file???

          R Offline
          R Offline
          Roman Fadeyev
          wrote on last edited by
          #4

          E3 wrote: creating an warpper for that file??? By Hands, sir, by your own hands :)

          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