Loading .LIB file and .DLL into MFC App.
-
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???
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
-
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
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
-
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???
E3 wrote: creating an warpper for that file??? By Hands, sir, by your own hands :)