Where is call for DLL within VisStu 6.0 C++
-
Hi, I am working with tool set template (C++ code for Vis.Stu. 6.0). I will pattern my own code after this template. The template calls a DLL. In the past when I have called DLLs from my code I have used the: LoadLibrary(something.DLL); But I can't find anywhere in the project's code (all the .cpp. .h .c files) where the DLL is loaded. When I compile the app everything wokes fine so the DLL is working. Also, when I do a text search on the project directory, I do indeed find the DLL in the files: .ilk .plg .dsp .pdb and the .exe I just can't dinf, within the Visual Studio user interface, where the DLL is declared/called/loaded. Many thanks, Robert :-)
-
Hi, I am working with tool set template (C++ code for Vis.Stu. 6.0). I will pattern my own code after this template. The template calls a DLL. In the past when I have called DLLs from my code I have used the: LoadLibrary(something.DLL); But I can't find anywhere in the project's code (all the .cpp. .h .c files) where the DLL is loaded. When I compile the app everything wokes fine so the DLL is working. Also, when I do a text search on the project directory, I do indeed find the DLL in the files: .ilk .plg .dsp .pdb and the .exe I just can't dinf, within the Visual Studio user interface, where the DLL is declared/called/loaded. Many thanks, Robert :-)
Is it possible that the DLL is statically linked to the application at the compile stage, and not dynamically loaded with a call to LoadLibrary? Look in the project's Properties dialog box and see if the DLL lib file is listed as a dependency.
-
Is it possible that the DLL is statically linked to the application at the compile stage, and not dynamically loaded with a call to LoadLibrary? Look in the project's Properties dialog box and see if the DLL lib file is listed as a dependency.
Troposphere, Many thanks for reply/answer. Indeed you are correct: In Project Settings | PreLink Tab: The something.DLL is copied from a source location into the Debug dir. In Project Settings | Link Tab: the something.LIB file is referenced. I am a bit unclear :-( on the difference between the .LIB and the .DLL Thanks again, Robert :)
-
Troposphere, Many thanks for reply/answer. Indeed you are correct: In Project Settings | PreLink Tab: The something.DLL is copied from a source location into the Debug dir. In Project Settings | Link Tab: the something.LIB file is referenced. I am a bit unclear :-( on the difference between the .LIB and the .DLL Thanks again, Robert :)
Basically, when a DLL is linked at compile-time by using the LIB, this embeds information into the EXE file that Windows uses to automatically load the DLL when the process first begins. So in effect, Windows is calling "LoadLibrary" for you. There is an excellent explanation on the difference between compile-time linking and dynamic linking in the MSDN library, if you look under "Dlls". Hope this helps, Rich
-
Basically, when a DLL is linked at compile-time by using the LIB, this embeds information into the EXE file that Windows uses to automatically load the DLL when the process first begins. So in effect, Windows is calling "LoadLibrary" for you. There is an excellent explanation on the difference between compile-time linking and dynamic linking in the MSDN library, if you look under "Dlls". Hope this helps, Rich
Thanks Rich :)