SoftwareShield COM-Activator™ Component  > COM-Activator™ Reference > CheckARCFormat

CheckARCFormat


The CheckARCFormat function checks the format of the Authorization Request Code parameter passed to it.

Syntax

HRESULT CheckARCFormat (

BSTR LPJFileNamePath,

BSTR AuthRequestCode,

VARIANT_BOOL * FormatOK,

long * ACG_return_code

);

Parameters

LPJFileNamePath

[IN] This is a wide string value that indicates the full path and filename of the license project file to use to validate the Authorization Request Code format.  The file must exist and must be an .LPJ file.

 

AuthRequestCode

[IN] This is a wide string value that must contain the Authorization Request Code that you wish to check for correct format.

 

FormatOK

[OUT] This is (a pointer to) a boolean value that will return true or false to indicate if the Authorization Request Code format was validated as OK.

 

ACG_return_code

[OUT] This is (a pointer to) a numeric value that returns with a ACG_RETURN_CODE that identifies the outcome of the operation.  See remarks below for more information.

Remarks

Use CheckARCFormat to validate the format of an Authorization Request Code.  The correct format of an Authorization Request Code is documented in Authorization Request Codes.

When CheckARCFormat is called, the ACG_return_code parameter will return holding ACG_FALSE_MISSING_MAIN_LF if the LPJFileNamePath parameter does not indicate a file that exists.  If the license project file exists, but is an invalid filename, it returns holding ACG_FALSE_BAD_MAIN_LF_FILENAME. If the License project exists and seems to be the correct format but an error occurred during loading it returns holding ACG_FALSE_MAIN_LF_CORRUPT.  

If the license project is successfully loaded, the Authorization Request Code is parsed.  If the Authorization Request Code is in an invalid format the ACG_return_code parameter returns holding ACG_FALSE_CODE_BAD_FORMAT.  If the format is OK, it returns holding ACG_TRUE_FORMAT_OK.

Note that although the license project file is loaded by this function, it is not validated against the license itself. To validate an Authorization Request Code against a license, use DecodeARC instead.

Return Value

As with all COM function calls they return an HRESULT. HRESULT is a data type that is a 32-bit error or warning code. Check your compilers documentation for information on interpreting the HRESULT value.

Function Information

Exposed By Interface:

"ISSCodeGenerator"

Exposed In COM Server Binary:

"SSCGen.dll"

 

Note: The COM Activator only comes with the Enterprise, Internet and Server Editions of the SoftwareShield DRM Kit.

Related Topics