Re: [GD-Windows] DLL initialization (was: Loading new DLLs on old Windows)
Brought to you by:
vexxed72
From: Andras B. <bn...@ma...> - 2004-02-15 14:47:55
|
It's not like one DLL for each class! :) You could have a class that provides factory functions, that can create multiple other classes. Also, the exported interface is usually _very_ high level. On the implementation side, the plugin can use thousands of classes in one DLL, it's just that they are internal to that module and not accessible to the outer world. BTW: I'm not loading that many DLLs. In fact, this small demo loads only one DLL, that contains all the logic. The factory creates a very small class called Main, that upon initialization creates multiple internal classes, which themselves subscribe to such events like Simulation, UI_Update, RenderScene, InputEvent, etc... (Event handling is provided by the framework, through a globally accessible interface). Andras Sunday, February 15, 2004, 12:21:00 PM, Nicolas Romantzoff wrote: > Hi, > I hope I'm not saying something too obvious, like ... Not loading more > than 64+ DLLs ? > Handles are quite limited under W9x (DOS), and in the past, we had > several trouble loading numerous plug-ins from big number of DLLs (in > fact 64+ :( ), we had to regroup some plug-ins. > BTW I saw in your first message something like "a DLL = a class" ! For a > medium project (1000 classes ?) that might be far too many DLLs to > handle for W9x :) > 1 DLL = 1 Class is a bad choice. You'd better have 1 class <--n----1--> > 1 factory = 1 DLL. > Soz if this was what you were doing. > Nicolas Romantzoff |