VLScgSetSharedLicType and VLScgSetTeamCriteria
Syntax
In case of non-capacity license:
int VLScgSetSharedLicType (VLScg_HANDLE iHandle, codeT *codeP, char *flag);
In case of capacity license, you need to use the VLScgSetTeamCriteria macro which is a wrapper to the VLScgSetSharedLicType API:
int VLScgSetTeamCriteria (VLScg_HANDLE iHandle, codeT *codeP, char *flag);
| Argument | Description | 
| iHandle | The instance handle for this library. | 
| codeP | The pointer to the codeT struct. | 
| flag | This flag enables shared licenses and specifies the sharing criteria. Legal values are: >VLScg_NO_SHARING_STRING = “0” >VLScg_USER_SHARING_STRING = “1” >VLScg_HOSTNAME_SHARING_STRING = “2” >VLScg_XDISPLAY_SHARING_STRING = “3” >VLScg_VENDOR_SHARING_STRING = “4” - Vendor defined / customized. Need to customize the client library for this. | 
Description
The concept of shared license is only applicable to network licenses. If sharing is enabled a user can use multiple instances of a protected application without consuming more than one license. Call this function enables sharing and also sets which criteria to use to determine eligibility of the user to share a license already granted to an existing user: user name, x-display ID, host name, or vendor-defined.
Sharing allows multiple copies of your application to run at the same time without using more than one license.
Returns
The status code VLScg_SUCCESS is returned if successful. Otherwise, it will return the following error codes:
| Error Code | Description | 
| VLScg_INVALID_INT_TYPE | If value is not numeric. | 
| VLScg_EXCEEDS_MAX_VALUE | If value exceeds VLScg_VENDOR_SHARING_STRING. | 
| VLScg_LESS_THAN_MIN_VALUE | If the value is lower than VLScg_NO_SHARING_STRING. | 
For the complete list of the error codes, refer to License Generation and Revocation Error Codes .