Jump to content

SOMLoadModule

From EDM2
Revision as of 03:42, 13 October 2017 by Martini (talk | contribs) (Functions)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function loads the dynamically linked library (DLL) containing a SOM class.

Syntax

string        className;
string        fileName;
string        functionName;
int           majorVersion;
long          minorVersion;
somToken     *modHandle;
int           rc;

rc = (*SOMLoadModule)(className, fileName,
       functionName, majorVersion, minorVersion,
       modHandle);

Parameters

className (string)
The name of the class whose DLL is to be loaded.
fileName (string)
The name of the DLL library file. This can be either a simple name or a fully-qualified pathname.
functionName (string)
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 this function looks for a routine named NewClass instead. If neither entry point is found, the default version of this function fails.
majorVersion (int)
The expected major version number of the class, to be passed to the initialization routine of the DLL.
minorVersion (long)
The expected minor version number of the class, to be passed to the initialization routine of the DLL.
modHandle (somToken *)
The address where this function should place a token that can be subsequently used by the SOMDeleteModule routine to unload the DLL.

Return Code

rc (int)
0 Returns 0 if successful. 
code Returns a non-zero system-specific error code if not successful. 

Remarks

This function loads the dynamically linked library (DLL) containing a SOM class. This routine is called by the SOM Class Manager to load DLLs. This function can be replaced (thus changing the way the Class Manager loads DLLS) by changing the value of the global variable SOMLoadModule.

Example Code


Related

Functions