somEnvironmentEnd

From EDM2
Jump to: navigation, search

This function provides general cleanup for applications.

Syntax

somEnvironmentEnd();

Parameters

Return Code

Remarks

This function is a general cleanup function that must be called by all Windows applications before exiting. AIX and OS/2 programs may also invoke this function, but it is not required on these systems because all necessary SOM cleanup is performed by the operating system during program termination.

A convenience macro, SOM_MainProgram , which usually appears at the beginning of each application, adds this function to the "atexit" list. If the "atexit" mechanism does not work reliably with your compiler, or if you know that your program bypasses the normal program termination sequence, you should insert an explicit call to this function at the point where your main program exits. (All main programs for Windows must begin either with the SOM_MainProgram macro or with a call to the somMainProgram function.)

Macros