Return current license usage

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows



int WINAPI win_lm_stat(char *producer, char *application, int *usage, int *syserr)


The producer code for your company, provided by Synergex. This is a null‑terminated 8‑bit ANSI string. (This code was assigned to your company by Synergex when you requested the License Key Generator.)


The code that you created to refer to the application. This is a null‑terminated 8‑bit ANSI string and can be up to six characters long.


An int32 pointer returned with the current number of users.


An int32 pointer returned with a system error code if the call fails.

The usage argument returns the current license usage for the specified application code. This value can be used to prepare a report of license usage, as required for xfServerPlus customers by the PLA.

The win_lm_stat function returns a status value. The most common ones are listed below; see the Licensing Toolkit Error Codes table for additional codes that could be returned.

0 = Success

1 = Product has not been configured

These status values are for your information only; they have no effect on your application. You must write code to handle the returned status.

If the call fails, syserr may be loaded with a system error number.

When calling win_lm_stat from a Synergy application, use the Synergy DLL API with the DLL_TYPE_WINAPI convention.

See lmstattest.c in, available from Synergy CodeExchange in the Resource Center on the Synergex website.