Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/main/java/com/cryptlex/lexactivator/LexActivator.java
Original file line number Diff line number Diff line change
Expand Up @@ -2079,6 +2079,29 @@ public static void ResetActivationMeterAttributeUses(String name)
}
}

/**
* Migrates existing license data to system-wide storage. Call this function
* after SetProductData(). If you intend to use a custom data directory after
* migration, set it first using SetDataDirectory(). <b>Note: </b> The function
* does not support migration from custom data directories.
*
* @param oldPermissionFlag previous permission flag used
* @return LA_OK, LA_FAIL
* @throws LexActivatorException
*/
public static int MigrateToSystemWideActivation(int oldPermissionFlag) throws LexActivatorException {
int status;
status = LexActivatorNative.MigrateToSystemWideActivation(oldPermissionFlag);
switch (status) {
case LA_OK:
return LA_OK;
case LA_FAIL:
return LA_FAIL;
default:
throw new LexActivatorException(status);
}
}

/**
* Resets the activation and trial data stored in the machine. This function is
* meant for developer testing only. <b>Note: </b>The function does not reset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,5 +305,7 @@ public interface ReleaseUpdateCallbackTypeA extends Callback {

public static native int ResetActivationMeterAttributeUses(WString name);

public static native int MigrateToSystemWideActivation(int oldPermissionFlag);

public static native int Reset();
}