[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]


Determining the Workbench version
*********************************

   An important point to mention is how to determine if a system is
running V44 instead of V40 or an earlier Workbench release. The
recommended approach is to open version.library, and check its version.
For example:

     struct Library *VersionBase;

     if (VersionBase = OpenLibrary("version.library", 0))
     {
         if (VersionBase->lib_Version >= 44)
         {
             /* user is running at least V44 Workbench */
         }
         else
         {
             /* user is running at most V37 Workbench */
         }
     }
     else
     {
         /* can't tell what the user is running, assume the minimum version
          * that your application supports
          */
     }

The above technique lets you determine which general version is in use
for the disk-based software.  Never assume this is a reflection of
every other library in the system.  For example, if you need features
of the asl.library that are only present since V44, you must explicitly
check the version of asl.library before using them. The same goes for
all other system libraries.