Loading DLL from a location in memory

后端 未结 2 486
误落风尘
误落风尘 2020-12-15 08:20

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

2条回答
  •  悲哀的现实
    2020-12-15 08:53

    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.

提交回复
热议问题