everal years and employers ago, I worked for a school of information technology in Australia. At one point, administrators, frustrated by a confusing and distributed collection of tools for testing and grading, decided they needed a single program that could manage lists of students and subjects, generate tests, grade submissions, and upload results to the central university systemwithout being constrained in any way by the actual software being assessed in the exams themselves.
By creating an ActiveX/DLL library, with test generators and markers for each product merged together, I was able to rework the system in just that way. A main program was constructed to perform all the necessary housekeeping functions and to search for the DLLs. Menus were dynamically constructed based on the DLLs present. All the logic to make and mark tests for specific products were bundled into these DLLs.
To support a new product became a matter of simply generating a new DLL and dropping it into a disk directory on each computer that was using the system. The main program needed no recompilation or reworking whatsoever.
There are countless ways that you can apply this kind of extensibility. In this article, I'll show you how to make your own expandable system using ActiveX/DLLs as plug-insin this case, a menu to manage a library of games.
Accompanying this article is the code for two VB6 projects implementing computer gamesone being the familiar and popular Reversi game, and the other a version of the classic Breakout.
Each of these projects is completely stand-alone, and both compile to a single .exe file.
Through this example, you'll learn the steps needed to convert your stand-alone programs into plug-in DLLs, and to write a generic program that detects these at run-time.