Re: [GD-Windows] loading a dll from memory
Brought to you by:
vexxed72
From: Ben C. <be...@gu...> - 2002-01-21 01:15:48
|
On Sunday, January 20, 2002, 10:55:56 PM, someone wrote: > Hi, > Is there a way to load a dynamic library from the memory instead of > a file? I have the dynamic library in the memory and I don't want to > write it to the winchester and use LoadLibrary() if it isn't necessery... Unfortunately, I believe this isn't possible, due to the way Windows handles shared areas of DLLs by memory-mapping to the file itself - I certainly looked around for a way to do it a couple of years ago back and couldn't find one. That said, if you just want to load a simple DLL you've created (ie no sharing between instances, etc), then I think it's fairly straightforward to implement your own PE format loader - http://www.winehq.org/ would probably be a good place to look if you did decide to try that. -- Ben Carter - Neko Technologies - be...@gu... http://www.neko-tech.com/ - http://www.absoluteterror.com/ ---------------------------------PGP Key available on request--- "Broken mirror, a million shades of light, the old echo fades away. But just you and I can find the answer, and then we can run to the end of the world." - Small of two pieces, Xenogears |