1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
/* LexActivator.h */
/*
Make sure you're using the MSVC or Intel compilers on Windows.
*/
typedef const wchar_t* CSTRTYPE;
typedef wchar_t* STRTYPE;
typedef const char* CSTRTYPE;
typedef char* STRTYPE;
typedef void ;
typedef void ;
/*
FUNCTION: SetProductFile()
PURPOSE: Sets the absolute path of the Product.dat file.
This function must be called on every start of your program
before any other functions are called.
PARAMETERS:
* filePath - absolute path of the product file (Product.dat)
RETURN CODES: LA_OK, LA_E_FILE_PATH, LA_E_PRODUCT_FILE
NOTE: If this function fails to set the path of product file, none of the
other functions will work.
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetProductData()
PURPOSE: Embeds the Product.dat file in the application.
It can be used instead of SetProductFile() in case you want
to embed the Product.dat file in your application.
This function must be called on every start of your program
before any other functions are called.
PARAMETERS:
* productData - content of the Product.dat file
RETURN CODES: LA_OK, LA_E_PRODUCT_DATA
NOTE: If this function fails to set the product data, none of the
other functions will work.
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetProductId()
PURPOSE: Sets the product id of your application.
This function must be called on every start of your program before
any other functions are called, with the exception of SetProductFile()
or SetProductData() function.
PARAMETERS:
* productId - the unique product id of your application as mentioned
on the product page in the dashboard.
* flags - depending upon whether your application requires admin/root
permissions to run or not, this parameter can have one of the following
values: LA_SYSTEM, LA_USER, LA_IN_MEMORY
RETURN CODES: LA_OK, LA_E_WMIC, LA_E_PRODUCT_FILE, LA_E_PRODUCT_DATA, LA_E_PRODUCT_ID,
LA_E_SYSTEM_PERMISSION
NOTE: If this function fails to set the product id, none of the other
functions will work.
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetDataDirectory()
PURPOSE: In case you want to change the default directory used by LexActivator to
store the activation data on Linux and macOS, this function can be used to
set a different directory.
If you decide to use this function, then it must be called on every start of
your program before calling SetProductFile() or SetProductData() function.
Please ensure that the directory exists and your app has read and write
permissions in the directory.
PARAMETERS:
* directoryPath - absolute path of the directory.
RETURN CODES: LA_OK, LA_E_FILE_PERMISSION
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetJniEnv()
PURPOSE: Sets the current thread's JNIEnv pointer. This is needed by LexActivator to
call Android specific functions.
This function must be called on every start of your Android app before calling the
SetProductId() function.
PARAMETERS:
* env - pointer to the JNIEnv.
RETURN CODES: LA_OK
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetDebugMode()
PURPOSE: Enables network logs.
This function should be used for network testing only in case of network errors.
By default logging is disabled.
PARAMETERS :
*enable - 0 or 1 to disable or enable logging.
RETURN CODES : LA_OK
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetCustomDeviceFingerprint()
PURPOSE: In case you don't want to use the LexActivator's advanced
device fingerprinting algorithm, this function can be used to set a custom
device fingerprint.
If you decide to use your own custom device fingerprint then this function must be
called on every start of your program immediately after calling SetProductFile()
or SetProductData() function.
The license fingerprint matching strategy is ignored if this function is used.
PARAMETERS:
* fingerprint - string of minimum length 64 characters and maximum length 256 characters.
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_CUSTOM_FINGERPRINT_LENGTH
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetLicenseKey()
PURPOSE: Sets the license key required to activate the license.
PARAMETERS:
* licenseKey - a valid license key.
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetLicenseUserCredential()
PURPOSE: Sets the license user email and password for authentication.
This function must be called before ActivateLicense() or IsLicenseGenuine()
function if 'requireAuthentication' property of the license is set to true.
PARAMETERS:
* email - user email address.
* password - user password.
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetLicenseCallback()
PURPOSE: Sets server sync callback function.
Whenever the server sync occurs in a separate thread, and server returns the response,
license callback function gets invoked with the following status codes:
LA_OK, LA_EXPIRED, LA_SUSPENDED,
LA_E_REVOKED, LA_E_ACTIVATION_NOT_FOUND, LA_E_MACHINE_FINGERPRINT
LA_E_AUTHENTICATION_FAILED, LA_E_COUNTRY, LA_E_INET, LA_E_SERVER,
LA_E_RATE_LIMIT, LA_E_IP, LA_E_RELEASE_VERSION_NOT_ALLOWED, LA_E_RELEASE_VERSION_FORMAT
PARAMETERS:
* callback - name of the callback function
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetActivationLeaseDuration()
PURPOSE: Sets the lease duration for the activation.
The activation lease duration is honoured when the allow client
lease duration property is enabled.
PARAMETERS:
* leaseDuration - value of the lease duration.
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetActivationMetadata()
PURPOSE: Sets the activation metadata.
The metadata appears along with the activation details of the license
in dashboard.
PARAMETERS:
* key - string of maximum length 256 characters.
* value - string of maximum length 256 characters.
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_METADATA_KEY_LENGTH,
LA_E_METADATA_VALUE_LENGTH, LA_E_ACTIVATION_METADATA_LIMIT
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetTrialActivationMetadata()
PURPOSE: Sets the trial activation metadata.
The metadata appears along with the trial activation details of the product
in dashboard.
PARAMETERS:
* key - string of maximum length 256 characters.
* value - string of maximum length 256 characters.
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_METADATA_KEY_LENGTH,
LA_E_METADATA_VALUE_LENGTH, LA_E_TRIAL_ACTIVATION_METADATA_LIMIT
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetAppVersion()
PURPOSE: Sets the current app version of your application.
The app version appears along with the activation details in dashboard. It
is also used to generate app analytics.
PARAMETERS:
* appVersion - string of maximum length 256 characters.
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_APP_VERSION_LENGTH
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetReleaseVersion()
PURPOSE: Sets the current release version of your application.
The release version appears along with the activation details in dashboard.
PARAMETERS:
* releaseVersion - string in following allowed formats: x.x, x.x.x, x.x.x.x
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_RELEASE_VERSION_FORMAT
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetReleasePublishedDate()
PURPOSE: Sets the release published date of your application.
PARAMETERS:
* releasePublishedDate - unix timestamp of release published date.
RETURN CODES: LA_OK, LA_E_PRODUCT_ID
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetReleasePlatform()
PURPOSE: Sets the release platform e.g. windows, macos, linux
The release platform appears along with the activation details in dashboard.
PARAMETERS:
* releasePlatform - release platform e.g. windows, macos, linux
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_RELEASE_PLATFORM_LENGTH
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetReleaseChannel()
PURPOSE: Sets the release channel e.g. stable, beta
The release channel appears along with the activation details in dashboard.
PARAMETERS:
* channel - release channel e.g. stable
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_RELEASE_CHANNEL_LENGTH
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetOfflineActivationRequestMeterAttributeUses()
PURPOSE: Sets the meter attribute uses for the offline activation request.
This function should only be called before GenerateOfflineActivationRequest()
function to set the meter attributes in case of offline activation.
PARAMETERS:
* name - name of the meter attribute
* uses - the uses value
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetNetworkProxy()
PURPOSE: Sets the network proxy to be used when contacting Cryptlex servers.
The proxy format should be: [protocol://][username:password@]machine[:port]
Following are some examples of the valid proxy strings:
- http://127.0.0.1:8000/
- http://user:pass@127.0.0.1:8000/
- socks5://127.0.0.1:8000/
PARAMETERS:
* proxy - proxy string having correct proxy format
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_NET_PROXY
NOTE: Proxy settings of the computer are automatically detected. So, in most of the
cases you don't need to care whether your user is behind a proxy server or not.
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: SetCryptlexHost()
PURPOSE: In case you are running Cryptlex on-premise, you can set the
host for your on-premise server.
PARAMETERS:
* host - the address of the Cryptlex on-premise server
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_HOST_URL
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetProductMetadata()
PURPOSE: Gets the product metadata as set in the dashboard.
This is available for trial as well as license activations.
PARAMETERS:
* key - key to retrieve the value
* value - pointer to a buffer that receives the value of the string
* length - size of the buffer pointed to by the value parameter
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_METADATA_KEY_NOT_FOUND, LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetProductVersionName()
PURPOSE: Gets the product version name.
PARAMETERS:
* name - pointer to a buffer that receives the value of the string
* length - size of the buffer pointed to by the name parameter
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_PRODUCT_VERSION_NOT_LINKED,
LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetProductVersionDisplayName()
PURPOSE: Gets the product version display name.
PARAMETERS:
* displayName - pointer to a buffer that receives the value of the string
* length - size of the buffer pointed to by the displayName parameter
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_PRODUCT_VERSION_NOT_LINKED,
LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetProductVersionFeatureFlag()
PURPOSE: Gets the product version feature flag.
PARAMETERS:
* name - name of the feature flag
* enabled - pointer to the integer that receives the value - 0 or 1
* data - pointer to a buffer that receives the value of the string
* length - size of the buffer pointed to by the data parameter
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_PRODUCT_VERSION_NOT_LINKED,
LA_E_FEATURE_FLAG_NOT_FOUND, LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLicenseMetadata()
PURPOSE: Gets the license metadata as set in the dashboard.
PARAMETERS:
* key - key to retrieve the value
* value - pointer to a buffer that receives the value of the string
* length - size of the buffer pointed to by the value parameter
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_METADATA_KEY_NOT_FOUND, LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLicenseMeterAttribute()
PURPOSE: Gets the license meter attribute allowed, total and gross uses.
PARAMETERS:
* name - name of the meter attribute
* allowedUses - pointer to the integer that receives the value
* totalUses - pointer to the integer that receives the value
* grossUses - pointer to the integer that receives the value
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_METER_ATTRIBUTE_NOT_FOUND
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLicenseKey()
PURPOSE: Gets the license key used for activation.
PARAMETERS:
* licenseKey - pointer to a buffer that receives the value of the string
* length - size of the buffer pointed to by the licenseKey parameter
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLicenseAllowedActivations()
PURPOSE: Gets the allowed activations of the license.
PARAMETERS:
* allowedActivations - pointer to the integer that receives the value
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLicenseTotalActivations()
PURPOSE: Gets the total activations of the license.
PARAMETERS:
* totalActivations - pointer to the integer that receives the value
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLicenseCreationDate()
PURPOSE: Gets the license creation date timestamp.
PARAMETERS:
* creationDate - pointer to the integer that receives the value
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_TIME, LA_E_TIME_MODIFIED
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLicenseActivationDate()
PURPOSE: Gets the activation creation date timestamp.
PARAMETERS:
* activationDate - pointer to the integer that receives the value
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_TIME, LA_E_TIME_MODIFIED
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLicenseExpiryDate()
PURPOSE: Gets the license expiry date timestamp.
PARAMETERS:
* expiryDate - pointer to the integer that receives the value
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_TIME, LA_E_TIME_MODIFIED
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLicenseMaintenanceExpiryDate()
PURPOSE: Gets the license maintenance expiry date timestamp.
PARAMETERS:
* maintenanceExpiryDate - pointer to the integer that receives the value
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_TIME, LA_E_TIME_MODIFIED
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLicenseMaxAllowedReleaseVersion()
PURPOSE: Gets the maximum allowed release version of the license.
PARAMETERS:
* maxAllowedReleaseVersion - pointer to a buffer that receives the value of the string.
* length - size of the buffer pointed to by the maxAllowedReleaseVersion parameter.
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLicenseUserEmail()
PURPOSE: Gets the email associated with license user.
PARAMETERS:
* email - pointer to a buffer that receives the value of the string
* length - size of the buffer pointed to by the email parameter
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED,
LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLicenseUserName()
PURPOSE: Gets the name associated with the license user.
PARAMETERS:
* name - pointer to a buffer that receives the value of the string
* length - size of the buffer pointed to by the name parameter
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED,
LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLicenseUserCompany()
PURPOSE: Gets the company associated with the license user.
PARAMETERS:
* company - pointer to a buffer that receives the value of the string
* length - size of the buffer pointed to by the company parameter
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED,
LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLicenseUserMetadata()
PURPOSE: Gets the metadata associated with the license user.
PARAMETERS:
* key - key to retrieve the value
* value - pointer to a buffer that receives the value of the string
* length - size of the buffer pointed to by the value parameter
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_METADATA_KEY_NOT_FOUND, LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLicenseOrganizationName()
PURPOSE: Gets the name associated with the license organization.
PARAMETERS:
* organizationName - pointer to a buffer that receives the value of the string
* length - size of the buffer pointed to by the organizationName parameter
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED,
LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLicenseOrganizationAddress()
PURPOSE: Gets the address associated with the license organization.
PARAMETERS:
* organizationAddress - pointer to the struct that receives the value of the organization's address
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED,
LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLicenseType()
PURPOSE: Gets the license type (node-locked or hosted-floating).
PARAMETERS:
* licenseType - pointer to a buffer that receives the value of the string
* length - size of the buffer pointed to by the licenseType parameter
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED,
LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetActivationMetadata()
PURPOSE: Gets the activation metadata.
PARAMETERS:
* key - key to retrieve the value
* value - pointer to a buffer that receives the value of the string
* length - size of the buffer pointed to by the value parameter
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_METADATA_KEY_NOT_FOUND, LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetActivationMode()
PURPOSE: Gets the mode of activation (online or offline).
PARAMETERS:
* initialMode - pointer to a buffer that receives the initial mode of activation
* initialModeLength - size of the buffer pointed to by the initialMode parameter
* currentMode - pointer to a buffer that receives the current mode of activation
* currentModeLength - size of the buffer pointed to by the currentMode parameter
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_TIME_MODIFIED,
LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetActivationMeterAttributeUses()
PURPOSE: Gets the meter attribute uses consumed by the activation.
PARAMETERS:
* name - name of the meter attribute
* allowedUses - pointer to the integer that receives the value
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_METER_ATTRIBUTE_NOT_FOUND
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetServerSyncGracePeriodExpiryDate()
PURPOSE: Gets the server sync grace period expiry date timestamp.
PARAMETERS:
* expiryDate - pointer to the integer that receives the value
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetTrialActivationMetadata()
PURPOSE: Gets the trial activation metadata.
PARAMETERS:
* key - key to retrieve the value
* value - pointer to a buffer that receives the value of the string
* length - size of the buffer pointed to by the value parameter
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_METADATA_KEY_NOT_FOUND, LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetTrialExpiryDate()
PURPOSE: Gets the trial expiry date timestamp.
PARAMETERS:
* trialExpiryDate - pointer to the integer that receives the value
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetTrialId()
PURPOSE: Gets the trial activation id. Used in case of trial extension.
PARAMETERS:
* trialId - pointer to a buffer that receives the value of the string
* length - size of the buffer pointed to by the trialId parameter
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED,
LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLocalTrialExpiryDate()
PURPOSE: Gets the trial expiry date timestamp.
PARAMETERS:
* trialExpiryDate - pointer to the integer that receives the value
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME_MODIFIED
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GetLibraryVersion()
PURPOSE: Gets the version of this library.
PARAMETERS:
* libraryVersion - pointer to a buffer that receives the value of the string
* length - size of the buffer pointed to by the libraryVersion parameter
RETURN CODES: LA_OK, LA_E_BUFFER_SIZE
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: CheckForReleaseUpdate()
PURPOSE: Checks whether a new release is available for the product.
This function should only be used if you manage your releases through
Cryptlex release management API.
PARAMETERS:
* platform - release platform e.g. windows, macos, linux
* version - current release version
* channel - release channel e.g. stable
* releaseUpdateCallback - name of the callback function.
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_RELEASE_VERSION_FORMAT
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: CheckReleaseUpdate()
PURPOSE: Checks whether a new release is available for the product.
This function should only be used if you manage your releases through
Cryptlex release management API.
When this function is called the release update callback function gets invoked
which passes the following parameters:
* status - determines if any update is available or not. It also determines whether
an update is allowed or not. Expected values are LA_RELEASE_UPDATE_AVAILABLE,
LA_RELEASE_UPDATE_NOT_AVAILABLE, LA_RELEASE_UPDATE_AVAILABLE_NOT_ALLOWED.
* release - returns release struct of the latest available release, depending on the
flag LA_RELEASES_ALLOWED or LA_RELEASES_ALL passed to the CheckReleaseUpdate().
PARAMETERS:
* releaseUpdateCallback - name of the callback function.
* releaseFlags - If an update only related to the allowed release is required,
then use LA_RELEASES_ALLOWED. Otherwise, if an update for all the releases is
required, then use LA_RELEASES_ALL.
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_RELEASE_VERSION_FORMAT, LA_E_RELEASE_VERSION,
LA_E_RELEASE_PLATFORM, LA_E_RELEASE_CHANNEL
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: ActivateLicense()
PURPOSE: Activates the license by contacting the Cryptlex servers. It
validates the key and returns with encrypted and digitally signed token
which it stores and uses to activate your application.
This function should be executed at the time of registration, ideally on
a button click.
RETURN CODES: LA_OK, LA_EXPIRED, LA_SUSPENDED, LA_E_REVOKED, LA_FAIL, LA_E_PRODUCT_ID,
LA_E_INET, LA_E_VM, LA_E_TIME, LA_E_ACTIVATION_LIMIT, LA_E_SERVER, LA_E_CLIENT,
LA_E_AUTHENTICATION_FAILED, LA_E_LICENSE_TYPE, LA_E_COUNTRY, LA_E_IP, LA_E_RATE_LIMIT, LA_E_LICENSE_KEY,
LA_E_RELEASE_VERSION_NOT_ALLOWED, LA_E_RELEASE_VERSION_FORMAT
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: ActivateLicenseOffline()
PURPOSE: Activates your licenses using the offline activation response file.
PARAMETERS:
* filePath - path of the offline activation response file.
RETURN CODES: LA_OK, LA_EXPIRED, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_OFFLINE_RESPONSE_FILE
LA_E_VM, LA_E_TIME, LA_E_FILE_PATH, LA_E_OFFLINE_RESPONSE_FILE_EXPIRED
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GenerateOfflineActivationRequest()
PURPOSE: Generates the offline activation request needed for generating
offline activation response in the dashboard.
PARAMETERS:
* filePath - path of the file for the offline request.
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_FILE_PERMISSION
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: DeactivateLicense()
PURPOSE: Deactivates the license activation and frees up the corresponding activation
slot by contacting the Cryptlex servers.
This function should be executed at the time of de-registration, ideally on
a button click.
RETURN CODES: LA_OK, LA_E_DEACTIVATION_LIMIT, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME
LA_E_LICENSE_KEY, LA_E_INET, LA_E_SERVER, LA_E_RATE_LIMIT, LA_E_TIME_MODIFIED
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GenerateOfflineDeactivationRequest()
PURPOSE: Generates the offline deactivation request needed for deactivation of
the license in the dashboard and deactivates the license locally.
A valid offline deactivation file confirms that the license has been successfully
deactivated on the user's machine.
PARAMETERS:
* filePath - path of the file for the offline request.
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_FILE_PERMISSION,
LA_E_TIME, LA_E_TIME_MODIFIED
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: IsLicenseGenuine()
PURPOSE: It verifies whether your app is genuinely activated or not. The verification is
done locally by verifying the cryptographic digital signature fetched at the time of
activation.
After verifying locally, it schedules a server check in a separate thread. After the
first server sync it periodically does further syncs at a frequency set for the license.
In case server sync fails due to network error, and it continues to fail for fixed
number of days (grace period), the function returns LA_GRACE_PERIOD_OVER instead of LA_OK.
This function must be called on every start of your program to verify the activation
of your app.
RETURN CODES: LA_OK, LA_EXPIRED, LA_SUSPENDED, LA_GRACE_PERIOD_OVER, LA_FAIL,
LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_MACHINE_FINGERPRINT,
LA_E_RELEASE_VERSION_NOT_ALLOWED
NOTE: If application was activated offline using ActivateLicenseOffline() function, you
may want to set grace period to 0 to ignore grace period.
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: IsLicenseValid()
PURPOSE: It verifies whether your app is genuinely activated or not. The verification is
done locally by verifying the cryptographic digital signature fetched at the time of
activation.
This is just an auxiliary function which you may use in some specific cases, when you
want to skip the server sync.
RETURN CODES: LA_OK, LA_EXPIRED, LA_SUSPENDED, LA_GRACE_PERIOD_OVER, LA_FAIL,
LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_MACHINE_FINGERPRINT
NOTE: You may want to set grace period to 0 to ignore grace period.
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: ActivateTrial()
PURPOSE: Starts the verified trial in your application by contacting the
Cryptlex servers.
This function should be executed when your application starts first time on
the user's computer, ideally on a button click.
RETURN CODES: LA_OK, LA_TRIAL_EXPIRED, LA_FAIL, LA_E_PRODUCT_ID, LA_E_INET,
LA_E_VM, LA_E_TIME, LA_E_SERVER, LA_E_CLIENT, LA_E_COUNTRY, LA_E_IP, LA_E_RATE_LIMIT
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: ActivateTrialOffline()
PURPOSE: Activates your trial using the offline activation response file.
PARAMETERS:
* filePath - path of the offline activation response file.
RETURN CODES: LA_OK, LA_TRIAL_EXPIRED, LA_FAIL, LA_E_PRODUCT_ID, LA_E_OFFLINE_RESPONSE_FILE
LA_E_VM, LA_E_TIME, LA_E_FILE_PATH, LA_E_OFFLINE_RESPONSE_FILE_EXPIRED
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: GenerateOfflineTrialActivationRequest()
PURPOSE: Generates the offline trial activation request needed for generating
offline trial activation response in the dashboard.
PARAMETERS:
* filePath - path of the file for the offline request.
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_FILE_PERMISSION
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: IsTrialGenuine()
PURPOSE: It verifies whether trial has started and is genuine or not. The
verification is done locally by verifying the cryptographic digital signature
fetched at the time of trial activation.
This function must be called on every start of your program during the trial period.
RETURN CODES: LA_OK, LA_TRIAL_EXPIRED, LA_FAIL, LA_E_TIME, LA_E_PRODUCT_ID, LA_E_TIME_MODIFIED
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: ActivateLocalTrial()
PURPOSE: Starts the local(unverified) trial.
This function should be executed when your application starts first time on
the user's computer.
PARAMETERS:
* trialLength - trial length in days
RETURN CODES: LA_OK, LA_LOCAL_TRIAL_EXPIRED, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME_MODIFIED
NOTE: The function is only meant for local(unverified) trials.
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: IsLocalTrialGenuine()
PURPOSE: It verifies whether trial has started and is genuine or not. The
verification is done locally.
This function must be called on every start of your program during the trial period.
RETURN CODES: LA_OK, LA_LOCAL_TRIAL_EXPIRED, LA_FAIL, LA_E_PRODUCT_ID,
LA_E_TIME_MODIFIED
NOTE: The function is only meant for local(unverified) trials.
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: ExtendLocalTrial()
PURPOSE: Extends the local trial.
PARAMETERS:
* trialExtensionLength - number of days to extend the trial
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME_MODIFIED
NOTE: The function is only meant for local(unverified) trials.
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: IncrementActivationMeterAttributeUses()
PURPOSE: Increments the meter attribute uses of the activation.
PARAMETERS:
* name - name of the meter attribute
* increment - the increment value
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_METER_ATTRIBUTE_NOT_FOUND,
LA_E_INET, LA_E_TIME, LA_E_SERVER, LA_E_CLIENT, LA_E_METER_ATTRIBUTE_USES_LIMIT_REACHED,
LA_E_AUTHENTICATION_FAILED, LA_E_COUNTRY, LA_E_IP, LA_E_RATE_LIMIT, LA_E_LICENSE_KEY
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: DecrementActivationMeterAttributeUses()
PURPOSE: Decrements the meter attribute uses of the activation.
PARAMETERS:
* name - name of the meter attribute
* decrement - the decrement value
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_METER_ATTRIBUTE_NOT_FOUND,
LA_E_INET, LA_E_TIME, LA_E_SERVER, LA_E_CLIENT, LA_E_RATE_LIMIT, LA_E_LICENSE_KEY,
LA_E_AUTHENTICATION_FAILED, LA_E_COUNTRY, LA_E_IP, LA_E_ACTIVATION_NOT_FOUND
NOTE: If the decrement is more than the current uses, it resets the uses to 0.
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: ResetActivationMeterAttributeUses()
PURPOSE: Resets the meter attribute uses consumed by the activation.
PARAMETERS:
* name - name of the meter attribute
* decrement - the decrement value
RETURN CODES: LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_METER_ATTRIBUTE_NOT_FOUND,
LA_E_INET, LA_E_TIME, LA_E_SERVER, LA_E_CLIENT, LA_E_RATE_LIMIT, LA_E_LICENSE_KEY,
LA_E_AUTHENTICATION_FAILED, LA_E_COUNTRY, LA_E_IP, LA_E_ACTIVATION_NOT_FOUND
*/
LEXACTIVATOR_API int LA_CC ;
/*
FUNCTION: Reset()
PURPOSE: Resets the activation and trial data stored in the machine.
This function is meant for developer testing only.
RETURN CODES: LA_OK, LA_E_PRODUCT_ID
NOTE: The function does not reset local(unverified) trial data.
*/
LEXACTIVATOR_API int LA_CC ;