How to know if licence key was correcly activated?

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
Erickc
User
Posts: 46
Joined: Tue Apr 12, 2016 2:36 pm

How to know if licence key was correcly activated?

Post by Erickc »

Hi,

We're the proud owner of a brand new PDF-XChange Editor SDK licence!

We used "SetLicKey" to activate it in our application and everything seems ok but we would like to be sure that the SDK was correctly registered.

In the online doc, SetLicKey has an output parmeter "VARIANT_BOOL* bKeyOK" that looks useful for this verification but while in Visual Studio, the method has only one input parameter for the key itself.
sample.jpg
sample.jpg (18.32 KiB) Viewed 820 times
There is also the HRESULT return value but it's always true, even if we pass a random value as licence key.

Could you please give us a way to confirm the registration of the licence key in our app?

Here is an extract of our code :

Code: Select all

                Boolean lb_result = new Boolean();
                
                lb_result = myControl.SetLicKey(  "KEY");
               return lb_result;


Thanks!

Eric
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to know if licence key was correcly activated?

Post by Sasha - Tracker Dev Team »

Hello Eric,

Well, that is a way of doing that correctly. The method appears differently is because you are using C# not C++. Here, the last OUT parameter is truncated to the method return value and the HRESULT itself can only be caught in the try..catch.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply