Foundation > Dynamic Modules > Loading a Dynamic Module > Explicit Mode
 
Explicit Mode
You can use the explicit module loading mode when your application knows which modules to load and where they can be found.
Let us suppose that you have created a module called myModule.dll on Microsoft Windows in C:\Rogue Wave\Views\Modules. If this directory is in your PATH variable, you can directly load your module (and therefore perform all the appropriate initialization) by calling the static member function Load:
IlvModule* myModule = IlvModule::Load("myModule", myParameter);
Rogue Wave® Views will attempt to open this module for you, sending the parameter myParameter to the module constructor, which you can use to send specific information to specific modules. When loading a module in implicit mode, this parameter is always set to 0.
The first parameter lets you specify a name for a module. It is sometimes easier to manipulate module names instead of pointers to IlvModule.
If the loading fails, Load returns 0.
The dynamic library is unloaded when the module instance that is returned is destroyed.

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.