VLSsetFileName
The VLSsetFileName API function allows setting the license or configuration file path in the ASCII format.
Enumeration Data Type
typedef enum {
VLS_LSERVRC,
VLS_LSERVRCCNF,
VLS_ULSERVRC, /*(The license file type VLS_ULSERVRC is not supported)*/
VLS_GENERICCONF
}VLS_FILE_TYPE;
Function Prototype
LS_STATUS_CODE VLSsetFileName
(
VLS_FILE_TYPE filetype, /*IN*/
unsigned char* fileName,/*IN*/
unsigned char* unused1,
unsigned long* unused2
);
Returns
>Returns LS_SUCCESS(0) on success.
>Returns non-zero on failure.
Parameter |
Description |
filetype |
An IN parameter. The type of license file (lservrc or lservrccnf) or configuration file you are going to provide a customized location/name. |
fileName |
An IN parameter. The custom name that you want to use. |
unused1 |
Reserved, Use NULL for this value. |
unused2 |
Reserved, Use NULL for this value. |
Code Snippet
#include "lserv.h"
int main(int argc, char* argv[])
{
LS_STATUS_CODE statusCode = LS_SUCCESS;
statusCode = VLSsetFileName(VLS_LSERVRC, "c:\\users\\app\\lservrc", NULL, NULL);
if (statusCode != LS_SUCCESS)
{
return 1; /* non-zero to mark failure */
}
statusCode = VLSinitialize();
if (statusCode != LS_SUCCESS)
{
return 1; /* non-zero to mark failure */
}
/* add the client application code here */
return 0;
}