Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to load a DLL from memory.
There is an article about that by Joachim Bauch.


I used his code to try and load a well know DLL (EasyHook64.dll by Codeplex[^]) from an array.

Here is my test code.
https://www.dropbox.com/s/av41gkpn3ps4lpx/Loadfromarray_Example.rar[^]

I can't find out why it fails...
Posted
Comments
Nelek 21-Sep-13 19:14pm    
Can't you reach the autor? I think he is the best option to get help
Michael Haephrati 22-Sep-13 6:54am    
I wrote to the author but never got a reply...
pasztorpisti 22-Sep-13 3:00am    
Forget what I've told about the CRT, a DLL may use the default C runtime and may be loaded successfully with the fancy DLL loader. Whether it succeeds or not is probably dependent on the crt version in use and the functions used/linked from the CRT. I've did a few tests long ago (with VC++6 at the time) and I've failed many times, this time I've did a few tests with VS2010 and my DLL worked with both statically and dynamically linked CRT although I've used only a few simple CRT functions.

As a first step implement your code so that you can switch between normal windows LoadLibrary() and the fancy loader with a define. If the code works with windows LoadLibrary() then the DLL doesn't like fancy loading.
Michael Haephrati 22-Sep-13 6:55am    
Again, I am not trying to compose a solution but querying why an existing solution doesn't work. If you haven't checked the source code included in the question, I don't see much point of anyone trying to help here. If posting a dropbox link is not suitable, I guess we need a better way for attaching large amount of code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900