1-46 SOMobjects Base Toolkit: Programmer’s Reference Manual
SOMLoadModule Function
Purpose
Loads the dynamically linked library (DLL) containing a SOM class.
Syntax
int (*SOMLoadModule) (
string className,
string fileName,
string functionName,
long majorVersion,
long minorVersion,
somToken *modHandle);
Description
The SOMLoadModule function loads the dynamically linked library (DLL) containing a SOM
class. This routine is called by the SOM Class Manager to load DLLs. SOMLoadModule
can be replaced (thus changing the way the Class Manager loads DLLS) by changing the
value of the global variable SOMLoadModule.
Parameters
className The name of the class whose DLL is to be loaded.
fileName The name of the DLL library file. This can be either a simple name or a fully
qualified pathname.
functionName The name of the routine to be called after the DLL is loaded. The routine is
responsible for creating a class object for each class in the DLL. Typically,
this argument will have the value SOMInitModule, obtained from the
SOMClassInitFuncName function. If no SOMInitModule entry exists in the
DLL, the default version of SOMLoadModule looks for a routine named
<className>NewClass instead. If neither entry point is found, the default
version of SOMLoadModule fails.
majorVersion The expected major version number of the class, to be passed to the
initialization routine of the DLL.
minorVersion The expected minor version number of the class, to be passed to the
initialization routine of the DLL.
modHandle The address where SOMLoadModule should place a token that can be
subsequently used by the SOMDeleteModule routine to unload the DLL.
Return Value
Returns 0 if successful or a non-zero system-specific error code otherwise.
Related Information
Functions: SOMDeleteModule, SOMClassInitFuncName
Kommentare zu diesen Handbüchern