Jump to content

SomMainProgram

From EDM2
Revision as of 17:35, 10 October 2017 by Martini (talk | contribs) (Created page with "This function performs SOM initialization on behalf of a new program. ==Syntax== <PRE> SOMClassMgr *rc; rc = somMainProgram(); </PRE> ==Parameters== ==Return Code== ; r...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function performs SOM initialization on behalf of a new program.

Syntax

SOMClassMgr     *rc;
rc = somMainProgram();

Parameters

Return Code

rc (SOMClassMgr *)
A pointer to the SOMClassMgr object.

Remarks

This function informs SOM about the beginning of a new thread of execution (called a task on Windows). The SOM Kernel then performs any needed initialization, including the deferred execution of the SOMInitModule functions found in statically-loaded class libraries. This function must appear near the beginning of all Windows main programs, and may also be used in AIX or OS/2 programs. When used, it supersedes any need to call the somEnvironmentNew function.

A convenience macro, SOM_MainProgram, which combines the execution of this function with the scheduling of the somEnvironmentEnd function during normal program termination, is available for C and C++ programmers.

Example Code


Related

Functions

  • somEnvironmentNew
  • somEnvironmentEnd

Macros

  • SOM_MainProgram
  • SOM_ClassLibrary