As the question says, I want to load a DLL from a location in memory instead of a file, similarly to LoadLibrary(Ex). I\'m no expert in WinAPI, so googled a little and found
Implementing your own DLL loader can get really hairy really fast. Reading this article it's easy to miss what kind of crazy edge cases you can get yourself into. I strongly recommend against it.
Just for a taste - consider you can't use any conventional debugging tools for the code in the DLL you're loading since the code you're executing is not listed in the region of any DLL known by the OS.
Another serious issue is dealing with DEP in windows.