Querying the library version

The complete Client Lib version string can be queried with

unsigned int ts3client_getClientLibVersion(result); 
char** result;

The result string must be released using ts3client_freeMemory. If an error has occured, the result string is uninitialized and must not be released.

To get only the version number, which is a part of the complete version string, as numeric value:

unsigned int ts3client_getClientLibVersionNumber(result); 
uint64* result;

Both functions return ERROR_ok on success, otherwise an error code as defined in public_errors.h.

An example using ts3client_getClientLibVersion:

unsigned int error;
char* version;
error = ts3client_getClientLibVersion(&version);
if(error != ERROR_ok) {
    printf("Error querying clientlib version: %d\n", error);
printf("Client library version: %s\n", version);  /* Print version */
ts3client_freeMemory(version);  /* Release string */

Example using ts3client_getClientLibVersionNumber:

unsigned int error;
uint64 version;
error = ts3client_getClientLibVersionNumber(&version);
if(error != ERROR_ok) {
    printf("Error querying clientlib version number: %d\n", error);
printf("Client library version number: %ld\n", version);  /* Print version */