Querying the library version

## Querying the library version

The complete Client Lib version string can be queried with

`unsigned int ts3client_getClientLibVersion(` | result`)`; |

`char** result`;

Parameters

- `result`

  Address of a variable that receives the clientlib version string, encoded in UTF-8.

| Caution
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`;

Parameters

- `result`

  Address of a variable that receives the numeric clientlib version.

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);
        return;
    }
    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);
        return;
    }
    printf("Client library version number: %ld\n", version);  /* Print version */

Initializing |  | Shutting down