The QMEnterPackage() function attempts to enter a licensed software package. It is analogous to the QMBasic ENTER.PACKAGE() function.
The function takes one argument, the package name and behaves differently according to the package type:
•For a registered package, it confirms that the named package is installed, has not expired, and that the user limit has not been reached. If all is ok, the user is recorded as being active in the package and the function returns 1. If an error occurs, the function returns 0 and the error code can be found using the QMStatus() function.
•For a private package, the function returns the number of users in the package, including the one attempting to enter. An error will return zero and the error code can be found using the QMStatus() function. It is the application's responsibility to apply any concurrent user limits or other constraints.
The examples below attempt to enter a registered package named SALESINFO, reporting an error if this fails.