Jump to content

SomEnvironmentEnd: Difference between revisions

From EDM2
Created page with "This function provides general cleanup for applications. ==Syntax== <PRE> somEnvironmentEnd(); </PRE> ==Parameters== ==Return Code== ==Remarks== This function is a genera..."
 
Line 13: Line 13:
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.  
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.)  
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  :'''  
'''Macros  :'''  
* SOM_MainProgram  
* [[SOM_MainProgram]]




[[Category:SOM Kernel]]
[[Category:SOM Kernel]]

Revision as of 23:30, 10 October 2017

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  :