Truxton get version

From truxwiki.com
Jump to navigation Jump to search

Retrieves the version of the Truxton application object.

Syntax

void truxton_get_version( uint64_t truxton_handle, char * destination_string, size_t max_size );

Parameters

truxton_handle

The handle created by the truxton_create call.

destination_string

The string to be written to.

max_size

The maximum number of characters that can be written to destination_string

Remarks

The string returned by this API will contain two version numbers. The first is the API version, the second is the database schema version. The following is a sample return value:

API: 3.3.0.203 Database: 3.1.0.0

Sample

void main()
{
    char version[256];

    truxton_start();

    uint64_t truxton = truxton_create();

    truxton_get_version( truxton, version, sizeof(version) );

    printf( "Truxton Version: %s\n", version );

    truxton_destroy( truxton );

    truxton_stop();
}