Professional OPC
Development Tools


Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Test for Valid License

03 Mar 2018 23:38 #6099 by jgyenese
Replied by jgyenese on topic Test for Valid License
This is a legacy app and I'm using VB6 (Ugh!).
After easily adapting your code for VB6, it is working perfectly.
Thank you!!!

Please Log in or Create an account to join the conversation.

02 Mar 2018 08:10 #6097 by support
Replied by support on topic Test for Valid License
Yes - please see the example below. It uses the EasyUAClient object, but it also works the same with EasyDAClient and EasyAEClient, even the number ranges are identical.
// Shows how to obtain the serial number of the active license, and determine whether it is a demo or trial license.
using System;
using OpcLabs.EasyOpc.UA;
namespace UADocExamples._EasyUAClient
    class LicenseInfo
        public static void SerialNumber()
            // Instantiate the client object.
            var client = new EasyUAClient();
            // Obtain the serial number from the license info.
            long serialNumber = (uint)client.LicenseInfo["Multipurpose.SerialNumber"];
            // Display the serial number.
            Console.WriteLine("SerialNumber: {0}", serialNumber);
            // Determine whether we are running as demo or trial.
            if ((1111110000 <= serialNumber) && (serialNumber <= 1111119999))
                Console.WriteLine("This is a demo or trial license.");
                Console.WriteLine("This is not a demo or trial license.");

After writing this, I have realized that you have posted this under the "... in COM" section. If you are not using .NET, which language or tool are you using? It should be possible to do the same from COM as well.

Best regards

Please Log in or Create an account to join the conversation.

01 Mar 2018 23:46 #6094 by jgyenese
Is there any way to test that the license is valid using code? Or perhaps a way to instruct it not to run as a demo if the license is invalid? I don't want to have to wait 30 minutes for something that the software already knows.

I am fanatical about keeping my software up to the latest version, but sometimes the new version is newer than the license file in my installer project. I just had an issue where I sent a customer a version that timed out and they weren't very happy.

Thank you.

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.053 seconds