Import one dll to another dll

Pages: 12
What about creating an other user32.dll in your exe directory with the same exported symbols that you need from the real user32.dll?
The exe would load your user32.dll since it is in the same folder, and your user32.dll would import the real one if needed
^ how do I try my user32.ll to import the real user32.dll?

On another note, I know loadlibrary and getprocaddress which calls the .dll and get the functions. Is there a way to all call the function in a dll without having to do getprocaddress for each function?
Just link the import library: user32.lib. I think that's already been touched on earlier in this thread.

EDIT: And of course include the header file <windows.h>.
Last edited on
Do I do the pragma comment(lib, user32.lib) OR properties -> linker->input->additional dependencies in Visual Studio 2010?
Last edited on
I'm pretty sure they work about the same. I usually do the second one. This assumes that you have Visual Studio set up correctly to work with the Windows SDK.
Topic archived. No new replies allowed.
Pages: 12