Re: [GD-Windows] loading a dll from memory
Brought to you by:
vexxed72
From: Gabor S. <ts...@co...> - 2002-01-21 18:20:24
|
Thanks everybody! Well, it seems that writing out the dll to the winchester will be the best way. I wouldn't like to get to know PE and the internal win32 functions... :) Cheers Gabor Simko > Hi, > > It is possible. We did it once in a company I worked for. We had the > ability to pack dll's and an exe into one exe which was compressed. A stub > decompressed the executables in memory. I cannot remember the exact details > as it was done by another programmer at out company but I can remember it > being a pain in the butt and it was done through low-level trickery (needing > knowledge of the PE32 format) rather than any Win32 API calls. > > Sorry I'm not much help, but I know it is possible. > > > Matt Davies > Programmer, Confounding Factor > ma...@co... > www.confounding-factor.com > > > > > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...]On Behalf Of > Ben Carter > Sent: 21 January 2002 01:16 > To: gamedev-windows > Subject: Re: [GD-Windows] loading a dll from memory > > > 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 > > > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > |