Answer
** Internal Publish Only! This article may contain information that is not intended for external circulation. **
Yes, as follows:
RepairASR
Repairs an ASR from a given string.
Syntax
HRESULT RepairASR(BSTR strAsr, BSTR password)
Parameters
The RepairASR function uses the following parameters:
Parameter Description strAsr ASR string. password Password string.
Return Values
The following values are returned by RepairASR:
Return Value Description HRESULT S_OK if success, E_FAIL if error.
Error Returns
If HRESULT is equal to E_FAIL, run get_LastError to view a description of the error.
Possible error codes and messages for RepairASR: · -1: “Could not process ASR” · -2: “ArcGIS Licensing handle error” · -3: “Invalid Password” · -4: “ASR is invalid or corrupt” · -98: “Could not load AfCore.dll”
RepairASRFromFile
Repairs an ASR from a given string.
Syntax
HRESULT RepairASRFromFile(BSTR fileName, BSTR password)
Parameters
The RepairASRFromFile function uses the following parameters:
Parameter Description fileName ASR file path. password Password string.
Return Values
The following values are returned by RepairASRFromFile:
Return Value Description HRESULT S_OK if success, E_FAIL if error.
Error Returns
If HRESULT is equal to E_FAIL, run get_LastError to view a description of the error.
Possible error codes and messages for RepairASRFromFile: · -1: “Could not process ASR” · -2: “ArcGIS Licensing handle error” · -3: “Invalid Password” · -4: “ASR is invalid or corrupt” · -98: “Could not load AfCore.dll”
CheckASR
Checks the integrity of the fulfillments authorized from the ASR string.
Syntax
HRESULT CheckASR(BSTR strAsr, BSTR password)
Parameters
The CheckASR function uses the following parameters:
Parameter Description strAsr ASR string. password Password string.
Return Values
The following values are returned by CheckASR:
Return Value Description HRESULT S_OK if success, E_FAIL if error.
Error Returns
If HRESULT is equal to E_FAIL, run get_LastError to view a description of the error. An E_FAIL return will presumably indicate the ASR licenses have become “untrusted”.
Possible error codes and messages for CheckASR: · -2: “ArcGIS Licensing handle error” · -3: “Invalid Password” · -4: “ASR is invalid or corrupt” · -5: “ASR is untrusted” · -98: “Could not load AfCore.dll”
CheckASRFromFile
Checks the integrity of the fulfillments authorized from an ASR file.
Syntax
HRESULT CheckASRFromFile(BSTR fileName, BSTR password)
Parameters
The CheckASRFromFile function uses the following parameters:
Parameter Description fileName ASR file path. password Password string.
Return Values
The following values are returned by CheckASRFromFile:
Return Value Description HRESULT S_OK if success, E_FAIL if error.
Error Returns
If HRESULT is equal to E_FAIL, run get_LastError to view a description of the error. An E_FAIL return will presumably indicate the ASR licenses have become “untrusted”.
Possible error codes and messages for CheckASRFromFile: · -2: “ArcGIS Licensing handle error” · -3: “Invalid Password” · -4: “ASR is invalid or corrupt” · -5: “ASR is untrusted” · -98: “Could not load AfCore.dll”
get_LastError
Gets the last known error code and message returned from the previously executed routine.
Syntax
HRESULT get_LastError(BSTR* lastError, int* lastErrorCode)
Parameters
The get_LastError function uses the following parameters:
Parameter Description lastError Pointer to string to hold the last error message. lastErrorCode Pointer to integer to hold the last error code.
Return Values
The following values are returned by get_LastError:
Return Value Description HRESULT S_OK if success, E_POINTER if null.
Possible lastErrorCode codes, lastError messages and troubleshooting tips:
· -1: “Could not process ASR” – Check that the application can locate and has read access to the ASR file on disk. Be sure the encrypted ASR file has not been truncated or modified in any way.
· -2: “ArcGIS Licensing handle error” – Check that the FLEXnet Licensing Service is installed on the machine. If not, the ArcGIS installation will need to be repaired.
· -3: “Invalid Password” – The password specified for the supplied ASR is invalid.
· -4: “ASR is invalid or corrupt” – The content of the ASR file is invalid or has been altered. Diff the ASR content with the original ASR received from Esri.
· -5: “ASR is untrusted” – The ASR fulfillments have become untrusted, most likely due to a hardware change. A repair operation must be performed to restore the ASR fulfillments.
· -98: “Could not load AfCore.dll” – The application has been unable to bind to an appropriate ArcGIS installation. Check to be sure the application has read access to the ArcGIS Engine or Desktop bin folder.
· -99: “Unknown Authorization Error” – An unexpected error has occurred. Contact Esri technical support with reproducible steps.
Error Returns
If HRESULT is equal to E_POINTER, there are no current error messages to report. get_FeaturesAdded
Gets the list of features added from the last authorization procedure.
Syntax
HRESULT get_FeaturesAdded(BSTR* featuresAdded)
Parameters
The get_FeaturesAdded function uses the following parameters:
Parameter Description featuresAdded Pointer to string to hold the features that were authorized. Features are delimited by an end of line character “\r\n”
Return Values
The following values are returned by get_FeaturesAdded:
Return Value Description HRESULT S_OK if success, E_POINTER if null.
Error Returns
If HRESULT is equal to E_POINTER, there are no current features that were authorized.
Retrieved from "http://fairfield/arcgis/index.php/ASR_License"