Skip to content

Commit

Permalink
Merge pull request #33 from cryptlex/feat/system-wide-activation
Browse files Browse the repository at this point in the history
feat: added LA_ALL_USERS flag
  • Loading branch information
ahmad-kemsan authored Apr 23, 2024
2 parents ee048db + 822998d commit 33ddf34
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
19 changes: 16 additions & 3 deletions lexactivator.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type releaseCallbackType func(int, *Release, interface{})
const (
LA_USER uint = 1
LA_SYSTEM uint = 2
LA_ALL_USERS uint = 3
LA_IN_MEMORY uint = 4
)

Expand Down Expand Up @@ -122,9 +123,21 @@ func SetProductData(productData string) int {
* 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
* flags - depending on your application's requirements, choose one of
the following values: LA_USER, LA_SYSTEM, LA_IN_MEMORY, LA_ALL_USERS.
LA_USER: This flag indicates that the application does not require
admin or root permissions to run.
LA_SYSTEM: This flag indicates that the application must be run with admin or
root permissions.
LA_IN_MEMORY: This flag will store activation data in memory. Thus, requires
re-activation on every start of the application and should only be used in floating
licenses.
LA_ALL_USERS: This flag is specifically designed for Windows and should be used
for system-wide activations.
RETURN CODES: LA_OK, LA_E_WMIC, LA_E_PRODUCT_FILE, LA_E_PRODUCT_DATA, LA_E_PRODUCT_ID,
LA_E_SYSTEM_PERMISSION
Expand Down
19 changes: 16 additions & 3 deletions lexactivator/LexActivator.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ typedef void (LA_CC *ReleaseCallbackTypeInternal)(int, CSTRTYPE);

#define LA_USER ((uint32_t)1)
#define LA_SYSTEM ((uint32_t)2)
#define LA_ALL_USERS ((uint32_t)3)
#define LA_IN_MEMORY ((uint32_t)4)

#define LA_RELEASES_ALL ((uint32_t)1)
Expand Down Expand Up @@ -120,9 +121,21 @@ LEXACTIVATOR_API int LA_CC SetProductData(CSTRTYPE productData);
* 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
* flags - depending on your application's requirements, choose one of
the following values: LA_USER, LA_SYSTEM, LA_IN_MEMORY, LA_ALL_USERS.
- LA_USER: This flag indicates that the application does not require
admin or root permissions to run.
- LA_SYSTEM: This flag indicates that the application must be run with admin or
root permissions.
- LA_IN_MEMORY: This flag will store activation data in memory. Thus, requires
re-activation on every start of the application and should only be used in floating
licenses.
- LA_ALL_USERS: This flag is specifically designed for Windows and should be used
for system-wide activations.
RETURN CODES: LA_OK, LA_E_WMIC, LA_E_PRODUCT_FILE, LA_E_PRODUCT_DATA, LA_E_PRODUCT_ID,
LA_E_SYSTEM_PERMISSION
Expand Down

0 comments on commit 33ddf34

Please sign in to comment.