Exit

 

The "Exit()" function is called when sliceOmatic exit.  It is a good place to free any memory that was allocated by your DLL.

 

 

Syntax

 

extern "C" __declspec(dllexport) int          Exit(

          void

)

 

 

Parameters

 

This function does not have a parameter.

 

 

Return value

 

The function returns 0 if an error occurred, 1 otherwise.

 

 

Remarks

 

This function is optional.  If you do not have any cleanup to do, you can omit it.

 

 

Requirements

 

Header:

          sliceO_include.hpp

 

 

Library:

          sliceO_Structures.lib

 

 

Example

 

...

 

// --- Normally, these static variable would be defined in "xxx_var.cpp".

// However, to make this example simpler we have defined them locally. ---

void *Demo_Var_Pointer ;

char *Demo_Var_String ;

 

// ----------------------------------------------------------------------------

//

//          Function:          Exit

//

//          Parameters:          void

//          Returns:          (int)                    0 if error

//

//          This is called once at the end of the program to enable you

//          to free any resources you allocated.

//

// ----------------------------------------------------------------------------

extern "C" __declspec(dllexport) int          Exit( void )

{

          Error_Fct( hwnd, ERROR_CODE_TRACE_5, "Demo module: Exit" ) ;

 

          free( (void *) Demo_Var_Pointer ) ;

          free( (void *) Demo_Var_String ) ;

 

          return( 1 ) ;

}

 

...

 

See also

 

Init