SK_PLUS_LicenseFileSave Function

Saves a License to a file or Windows Registry key.


Important Note

This function calls SK_PermissionsGrantControlToWorld to help ensure all users have access.

Important Note

When implementing shared network licenses, it is strongly recommended to re-load the license file (using SK_PLUS_LicenseFileLoad or SK_PLUS_LicenseLoad), update the data as needed, and then save the license file. Although this will increase network traffic, it will help avoid synchronization issues when the same license file is shared by multiple users.


SK_ResultCode SK_PLUS_LicenseFileSave(SK_ApiContext context, int flags, const char *path, SK_XmlDoc license);
Visual Basic
Declare Function SK_PLUS_LicenseFileSave(ByVal context As Long, ByVal flags As Long, ByVal path As String, ByVal license As Long) As Long


The API Context handle.
Any flags passed into this function-call.
The absolute path to the License file or Windows Registry Key location.
An XML document containing the contents of the license. SK_PLUS_LicenseGetXmlDocument may be used to retrieve these contents.


All possible return values are included in the SK_ResultCode enumeration. Return codes to expect include:

Result Code Description
SK_ResultCode.SK_ERROR_NONE No error.
SK_ResultCode.SK_ERROR_ENCRYPTION_FAILED The requested encryption operation has failed.
SK_ResultCode.SK_ERROR_SIGNING_FAILED The requested signing operation has failed.
SK_ResultCode.SK_ERROR_XML_PARSER_FAILED The XML parser encountered an error.
SK_ResultCode.SK_ERROR_INVALID_ARGUMENTS Some or all of the arguments are invalid.
SK_ResultCode.SK_ERROR_COULD_NOT_OPEN_FILE An attempt to open a file failed.
SK_ResultCode.SK_ERROR_COULD_NOT_WRITE_FILE An attempt to write a file failed.
SK_ResultCode.SK_ERROR_COULD_NOT_OPEN_REGISTRY_KEY An attempt to open a registry key failed.
SK_ResultCode.SK_ERROR_COULD_NOT_WRITE_REGISTRY_KEY An attempt to write a registry key value failed.
SK_ResultCode.SK_ERROR_MEMORY_ALLOCATION Memory could not be allocated.