Loading DLL inside the code
-
Hello, I would like to know what is the proper way to use LoadLibrary() when loading DLLs. In my project, it depends on couple DLL files to run. Those DLLs need to sit in Windows\win32\ or the same folder as the executable file. However, I want to put those DLL filew into some fixed place and when my application starts to run, I can load them to the memory. I try to use LoadLibrary() function but I don't know where should I call this function in the code. It is because everytime I start the program, I already get the "missing dll" error and the program get terminated before any code has been run. Any idea about this? Am I missing something? Thanks! Nacho -- modified at 18:12 Tuesday 9th May, 2006
-
Hello, I would like to know what is the proper way to use LoadLibrary() when loading DLLs. In my project, it depends on couple DLL files to run. Those DLLs need to sit in Windows\win32\ or the same folder as the executable file. However, I want to put those DLL filew into some fixed place and when my application starts to run, I can load them to the memory. I try to use LoadLibrary() function but I don't know where should I call this function in the code. It is because everytime I start the program, I already get the "missing dll" error and the program get terminated before any code has been run. Any idea about this? Am I missing something? Thanks! Nacho -- modified at 18:12 Tuesday 9th May, 2006
-
Hello, I would like to know what is the proper way to use LoadLibrary() when loading DLLs. In my project, it depends on couple DLL files to run. Those DLLs need to sit in Windows\win32\ or the same folder as the executable file. However, I want to put those DLL filew into some fixed place and when my application starts to run, I can load them to the memory. I try to use LoadLibrary() function but I don't know where should I call this function in the code. It is because everytime I start the program, I already get the "missing dll" error and the program get terminated before any code has been run. Any idea about this? Am I missing something? Thanks! Nacho -- modified at 18:12 Tuesday 9th May, 2006
use LoadLibrary for load your dll and use GetProcAddress for functions in dll and in the end use FreeLibrary