LMGR

The LMGR function tests whether a particular licensing mode is in effect. The function returns True (1) if the mode specified is in effect, or False (0) otherwise. Different licensing modes are specified by keyword; see the Keywords section below for a description of each licensing mode.

The LMGR function can also force IDL into time demo mode or report the LMHostid number for the machine in use.

For more information on IDL's licensing methods, consult the IDL License Management Guide , which is included in Adobe Acrobat Portable Document Format on your IDL CD-ROM.

Calling Sequence

Result = LMGR()

Arguments

None.

Keywords

CLIENTSERVER

Set this keyword to test whether the current IDL session is using Client/Server licensing (as opposed to Desktop licensing).

DEMO

Set this keyword to test whether the current IDL session is running in timed demo mode. Unlicensed copies of IDL and copies running directly from a CD-ROM run in timed demo mode.

EMBEDDED

Set this keyword to test whether the current IDL session is running in embedded mode. Embedded-mode applications contain a built-in version of the IDL license. Examples of applications running in embedded mode are the IDL demo and the IDL registration program.

FORCE_DEMO

Set this keyword to force the current session into timed demo mode. Forcing an IDL session into demo mode can be useful if you are testing an application that will be run with an unlicensed copy of IDL. Note that you must exit IDL and restart to return to normal licensed mode after forcing IDL into demo mode.

LMHOSTID

Set this keyword equal to a named variable that will contain a string value represeting the LMHostid for the machine in use. The LMHostid is used when creating client/server IDL licenses. This keyword returns the string "0" on machines which do not have a unique LMHostid (Macintoshes and some Windows machines that use Desktop licensing.)

RUNTIME

Set this keyword to test whether the current IDL session is running in runtime mode. Runtime-mode applications do not provide access to the IDL command line. See the IDL Runtime Guide for additional details on runtime applications.

STUDENT

Set this keyword to test whether the current IDL session is running in student mode. The IDL Student version, which provides a subset of IDL's full functionality, is currently the only product that runs in student mode.

TRIAL

Set this keyword to test whether the current IDL session is running in trial mode. Trial mode licenses allow IDL to operate for a limited time period (generally 30 days) but do not otherwise restrict functionality.

Example

Use the following commands to test whether the current IDL session is running in timed demo mode:

Result = LMGR(/DEMO)

IF (Result GT 0) THEN PRINT, "IDL is in Demo Mode"

Use the following commands to generate the LMHostid number for the machine in use:

Result = LMGR(LMHOSTID = myId)

PRINT, "LMHostid for this machine is: ", myId