HasFloatingLicense returns LF_FAIL instead of LF_E_NO_LICENSE

In the recent versions of LexFloatClient, calling HasFloatingLicense before calling RequestFloatingLicense now returns LF_FAIL instead of LF_E_NO_LICENSE like it used to. The first version that switched to E_FAIL that I could test was 4.9.0; 4.8.0 still returned LF_E_NO_LICENSE. I don’t know how 4.8.1 behaves.

In my case I want to call HasFloatingLicense before RequestFloatingLicense due to the architecture of the application. I’m developing a suite of plugins, all running under the same host application, so if all plugins would just call RequestFloatingLicense they would collectively claim more than one seat from the floating server. Calling HasFloatingLicense beforehand enables me to see if another plugin in the same process has already done the heavy lifting for me, right?

If this is indeed a bug, it would be very nice if it was fixed Soon… I’m also in the process of enabling ARM64 support for plugins, since the host app will soon release their ARM64 version too. And only the latest (and still misbehaving) version 4.10.0 of LexFloatClient supports ARM64.

Thanks in advance!

Hi @CarlColijn,

Thank you for reporting this!

I will get in touch with our team and keep you posted here!

Hi @CarlColijn

Yes, the behavior you’re observing is expected from version 4.9.0 onwards. In these versions, HasFloatingLicense() can return either LF_FAIL or LF_E_NO_LICENSE when the client has not yet consumed a seat. Both return codes indicate that a floating license is not currently held by the client, and in either case, a call to RequestFloatingLicense() is appropriate. We recommend the following approach:

In C, Handle both LF_FAIL and LF_E_NO_LICENSE as indicators that a license has not yet been acquired.

In our wrappers for other supported languages, HasFloatingLicense() already abstracts this logic and returns false in both of these cases to simplify integration.

Also, we’ve identified a potential improvement to make this flow more predictable and will be shipping a fix in an upcoming release.

Regards,
Ahmad.

Thanks for the information! I’ll then treat LF_FAIL the same as LF_E_NO_LICENSE when calling HasFloatingLicense.

1 Like