Sun Java System Messenger Express 6 2005Q4 Customization Guide

SDK Cleanup

The following function is called to shut down and clean up any resources used by the SDK:

int EXP_Shutdown()

Typically it is not necessary to call the EXP_Shutdown() function in a simple CGI, but if the SDK is used as a plug-in in a continuous server running environment (such as Portal Server) the EXP_Shutdown() is called to reclaim the resources.

The function returns a 0 on successful initialization or a non-zero number indicating failure, and errno is then set to the most appropriate value based upon what failed. These codes also map to standard errno values.

The following function returns a const pointer to a null-terminated string identifying the version number of the SDK being used:

const char*EXP_GetVersion()

The value returned by the EXP_GetVersion() function should not be used in any dependant manner. In other words, do not write programs that expects this string to be in a certain format or contain a certain value. This string is only available to provide information on the version number of the SDK being used.

If no information on the version number is available, the function returns NULL.

The following function can be used to tell the SDK to contact a non-standard port when connecting to the Messenger Express service to generate a session:

void EXP_SetHttpPort

(init iHttpPort)

By default the SDK contacts the standard HTTP port, 80. This function is not thread safe and sets a global value. If you want to use it in a thread environment, lock the call and call the function EXP_GenerateLoginURL.