VLSinitialize
Initializes the licensing library.
Syntax
LS_STATUS_CODE VLSinitialize(void);
This function has no arguments.
You may instead use the VLS_INITIALIZE macro which is a wrapper to the VLSinitialize API and has the following syntax:
#define VLS_INITIALIZE()
Description
This call must be made before any RMS licensing library function can be called. It initializes and allocates resources necessary for the RMS licensing library.
The applications that call the UNIX standard-C library function, fork, generally follow this call with an exec function call to re-initialize all global values. For some applications, however, this may be undesirable. In such cases, issue the call before the first LSRequest call and after each fork call. This call is not necessary for applications that do not use fork or exec after forking. Calling this function unnecessarily does not have any negative side effects.
Returns
The status code LS_SUCCESS is returned if successful. Otherwise, it will return the following error codes:
Error Code |
Description |
LS_NORESOURCES |
An error occurred in attempting to allocate memory needed by function. |
LS_NO_NETWORK |
Failed to initialize Winsock wrapper (only applicable if using network-only library). |
VLS_RESOURCE_LOCK_FAILURE | Failed to fetch the API resource lock. Can occur if some other application has already acquired this lock. So, after the timeout period of 15 seconds, the current application throws this error. On receiving this error, retry calling this API. |
For a complete list of the error codes, see Licensing Library Error and Result Codes.