![]() |
![]() |
All APIs have some form of version control, and X/Open is no exception. Ensure that the version of the X/Open API you are using in your application is compatible with the version of the API library that the end users have installed on their workstations.
The first API call that is issued when using the X/Open API should be BSAQueryApiVersion. This call:
The X/Open API is upwardly compatible. Applications written to older versions or releases of the API library will still operate correctly if the end user is running a newer version.
Determining the release of the API library is very important because some releases may have different memory requirements and data structure definitions. Downward compatibility might be possible on an individual basis. However, it is not recommended. Downward compatibility, if a requirement, is the responsibility of the application client.
The API library and the Trusted Communication Agent module (dsmtca) must be at the same level.
The BSAQueryApiVersion call returns the version of the API library that is installed on the end user's workstation. You can then compare the returned value with the version of the X/Open API with which the application client was built.
The version number of the application client's API is entered in the compiled object code as a set of three constants:
BSA_API_VERSION BSA_API_RELEASE BSA_API_LEVEL
These constants are defined in the header file custom.h. The application client's API version should usually be less than, or equal to, the API library installed on the user's system. Be careful with any other condition.
The BSAQueryApiVersion call can be made at any time, whether the API session has been started or not.