我怎么能直接从内存中执行德尔福code? [英] How can I execute code directly from memory in delphi?
问题描述
是否有可能模仿调用LoadLibrary
功能?我想加载从BLOB字段的库没有首先将其写入到一个临时文件,我需要一个解决方案,它不依赖于Delphi编译器或Windows的具体版本,而不会触发防病毒软件。
Is it possible to mimic the loadlibrary
function? I want to load a library from a BLOB field without first writing it to a temporary file, and I need a solution which is not dependent on specific version of delphi compiler or windows, and does not trigger antivirus software.
推荐答案
dzlib包含了从资源到内存中读取一个DLL和使用它,没有它永远保存到光盘一个现成的对象:
dzlib contains a ready made object for reading a dll from a resource into memory and using it without ever saving it to disc:
这是主要的文件...
This is the main file ...
<一个href=\"http://sourceforge.net/p/dzlib/$c$c/147/tree/dzlib/trunk/src/u_dzResourceDllLoader.pas\">http://sourceforge.net/p/dzlib/$c$c/147/tree/dzlib/trunk/src/u_dzResourceDllLoader.pas
..但它从同一个库中需要的其他文件。
.. but it needs other files from the same repository.
这篇关于我怎么能直接从内存中执行德尔福code?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!