Initializing help system before first use

XPRSgetlicerrmsg

Purpose
Retrieves an error message describing the last licensing error and returns the corresponding licensing error code, if any occurred.
Topic area
Synopsis
int XPRSgetlicerrmsg(char *buffer, int maxbytes);
Arguments
buffer 
Buffer to hold the message. If this is NULL then the function will not store anything, independent of the value of maxbytes.
maxbytes 
Length of the buffer. The function will store at most this many characters (including the terminating NUL) in the buffer. If maxbytes is smaller than 1, the function will not store anything in buffer. If maxbytes is 1, then function will store the empty string buffer. If the message is longer than maxbytes then it will be truncated to fit.
Example
The following calls XPRSgetlicerrmsg to find out why XPRSinit failed:
char message[512];
...
if(XPRSinit(NULL) != 0)
{
  int code = XPRSgetlicerrmsg(message,512);
  printf("Licensing error %d: %s\n", code, message);
}
Further information
1. The function never fails. It always returns the error code of the last license acquisition or zero if there was no error. The licensing error code is also included in the error message (provided the buffer is large enough).
2. It's recommended that you pass a buffer of at least 2048 bytes as licensing errors can be qute long. If the error message is too large to fit in the buffer, the first maxbytes-1 characters will be returned.
Related topics

© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.