RE: [GD-Windows] Using LoadLibrary in DllMain....
Brought to you by:
vexxed72
From: Jon W. <hp...@mi...> - 2002-10-11 18:49:44
|
Here's a possible implementation of the DLL loader code: void WindowsDLLLoader( char const * filename ) { AcquireLock( globalDllLock ); void * address = ReadFile( filename ); RelocateDll( address ); if( !CallDllWinMain( address ) ) { FreeDllMemory( address ); } ReleaseLock( globalDllLock ); } I'm sure there's other problems, such as with cyclic dependencies (perhaps involving more than two DLLs) and initialization order. Cheers, / h+ > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...]On Behalf Of > Pierre Terdiman > Sent: Friday, October 11, 2002 11:28 AM > To: gam...@li... > Subject: [GD-Windows] Using LoadLibrary in DllMain.... > > > ....is not a good idea, according to the MSDN. > > Why ? What are the possible consequences ? > > Thanks, > Pierre > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > |