The Server Lib version can be queried with
unsigned int ts3server_getServerLibVersion( | result) ; |
char** result
;
Parameters
result
Address of a variable that receives the serverlib version string, encoded in UTF-8.
![]() | Caution |
---|---|
The result string must be released using |
To get only the version number, which is a part of the complete version string, as numeric value:
unsigned int ts3server_getServerLibVersionNumber( | result) ; |
uint64* result
;
Parameters
result
Address of a variable that receives the numeric serverlib version.
Both functions return ERROR_ok
on success, otherwise an error code as defined in public_errors.h
.
Example code to query the Server Lib version:
unsigned int error; char* version; error = ts3server_getServerLibVersion(&version); if(error != ERROR_ok) { printf("Error querying serverlib version: %d\n", error); return; } printf("Server library version: %s\n", version); /* Print version */ ts3server_freeMemory(version); /* Release string */