Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / General Programming / Class method loading from dll's Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Russell Klenk

September 15, 1999, 03:10 PM

Hello,

Two questions:
1. How do you dynamically load an entire class from a DLL?
2. How would you load only specific class methods from a dll? For example, I have everything
but the Sector::Render() method implemented in engine_core.dll, but Sector::Render() is
loaded from one of three dll's based on the user's choice of 3d api.

thanx,

Russell Klenk
klenk@liquidinteractive.com

 
Kenton Varda

September 20, 1999, 02:31 PM



Russell Klenk wrote:
>>Hello,
>>
>>Two questions:
>>1. How do you dynamically load an entire class from a DLL?

Define an abstract (virtual) base class for the class and then put a function into the dll that
creates a derived class. For example:

class CDerived: public CAbstract;
CAbstract* create() {return new CDerived;}

Export the create() function, and you're set!

>>2. How would you load only specific class methods from a dll? For example, I have everything
>> but the Sector::Render() method implemented in engine_core.dll, but Sector::Render() is
>> loaded from one of three dll's based on the user's choice of 3d api.

Only define as virtual the methods that you want loaded from the dll.

-Kenton Varda, GAUGE project

 
This thread contains 2 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.