2-8
SOMobjects Base Toolkit: Programmer’s Reference Manual
SOMD_Init Function
Purpose
Initializes DSOM in the calling process.
C Syntax
void SOMD_Init (Environment* env);
Description
Initializes DSOM in the calling process. This function should be called before any other
DSOM functions or methods. This function should only be invoked (a) at the beginning of a
DSOM program (client or server), to initialize the program, or (b) after SOMD_Uninit has
been invoked, to reinitialize the program. If the program has already been initialized with
SOMD_Init, then invoking SOMD_Init again has no effect.
An effect of calling SOMD_Init is that the global variables SOMD_ObjectMgr,
SOMD_ImplRepObject, and SOMD_ORBObject, are initialized with pointers to the (single)
instances of the SOMDObjectMgr, ImplRepository, and ORB objects.
Parameters
env A pointer to the Environment structure for the caller.
Return Value
None. (However, the global variables SOMD_ObjectMgr, SOMD_ImplRepObject, and
SOMD_ORBObject are set implicitly.)
Example
#include <somd.h>
Environment ev;
/* initialize Environment */
SOM_InitEnvironment(&ev);
/* initialize DSOM runtime */
SOMD_Init(&ev);
...
/* Free DSOM resources */
SOMD_Uninit(&ev);
Related Information
SOM Toolkit User’s Guide.
Kommentare zu diesen Handbüchern