View Single Post
Old 09-18-2005, 09:18 AM   #1 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 734
DJMaze is on a distinguished road
Dynamicly load DLL classes

In all my years of coding i never dynamicly loaded classes from a DLL.
However the last weeks i've discovered this is a "must have" in certain circumstances.

For example i wrote a MP3 player with a flat database system, but somehow my users pushed it over the limit by adding 100.000+ music files in the database which made it very slow. So i needed to figure out a way how to control a database in a server/client behavior in many ways like SQLite, MySQL, Postgre and flatfile.
Now there's an issue because each database engine has his own function calls but your program only wants to load one of them but don't want the overhead of everything in your system.

The solution is DLL's and SO's with functions. But functions are limited and don't allow multiple instances easily unless you identify each so i've decided to use classes in libraries.

But how do you export them ?

Actualy i've found a good examples on the internet which made my task complete. The example was called 'expclass' but i totally forgot where i found it so credits to author will be attached when i find it again

But i have an problem, i can't add attachments in here so could i have permission or something ?
DJMaze is offline   Reply With Quote