VLSgetMachineIDString

Returns an encrypted string that contains the fingerprint information based on the locking criteria specified in the call.

Use this call when you are trying to check out a commuter authorization for a remote computer that does not have access to the License Manager. The computer that will actually use the commuter authorization runs this call and then passes on the string (via e-mail, disk, etc.) to a computer that has access to the License Manager. The commuter authorization is then checked out and transmitted to a remote user, and locked to the information given by this string.

If the machine that requires the commuter authorization has network access to the License Manager, then you do not need to use this method. Instead, check out the license using VLSgetAndInstallCommuterCode or VLSgetAndInstallCommuterCodeExt API.

Syntax

LS_STATUS_CODE VLSgetMachineIDString (	 	 
unsigned long	 	*lock_selector,
unsigned char	 	*machineIDString,
unsigned long	 	*bufSz );

Argument

Description

lock_selector

Bitmask identifying what criteria you would like to include in the Machine ID string. See the lock_selector Values below for information on the values for this bitmask. If you set this argument to NULL, this API call will use the locking selector information it finds on the computer on which it is running.

machineIDString

A string that represents the machine’s locking information. This will be passed on to VLSgetCommuterCode on a computer that can actually check out a commuter authorization from the License Manager.

bufSz

Returns the buffer size of the machineIDString parameter if machineIDString is NULL. Otherwise, specifies the size of the machineIDString parameter.

Returns

The status code LS_SUCCESS is returned if successful. Otherwise, a specific error code is returned indicating the reason for the failure. Possible errors returned include VLS_UNABLE_TO_GET_MACHINE_ID_STRING.

For a complete list of error codes, see Licensing Library Error and Result Codes.

If NULL is passed as the locking criteria in the VLSgetMachineIDString call, VLS_CALLING_ERROR is returned.

lock_selector Values

The value of lock_selector is a bitmask in which each bit selects a fingerprinting element. It does not describe the fingerprint, but only designates the locking criteria that will be used to compute the fingerprint. The masks which define each locking criterion are listed below:

VLS_LOCK_ID_PROM	       0x1
VLS_LOCK_IP_ADDR	 	0x2
VLS_LOCK_DISK_ID	 	0x4
VLS_LOCK_HOSTNAME	 	0x8
VLS_LOCK_ETHERNET	 	0x10
VLS_LOCK_PORTABLE_SERV	 	0x80
VLS_LOCK_CUSTOM	 	0x100
VLS_LOCK_CUSTOMEX	 	0x400
VLS_LOCK_HARD_DISK_SERIAL	0x800
VLS_LOCK_CPU_INFO	 	0x1000
VLS_LOCK_UUID	 		0x2000
VLS_LOCK_ALL	 		0x1FFF

VLS_LOCK_PORTABLE_SERV refers to the Computer ID key, and that VLS_LOCK_ALL selects all locking criteria.