Difference between revisions of "Truxton get version"

From truxwiki.com
Jump to navigation Jump to search
Line 15: Line 15:
 
==<code>max_size</code>==
 
==<code>max_size</code>==
 
The maximum number of characters that can be written to <code>destination_string</code>
 
The maximum number of characters that can be written to <code>destination_string</code>
 +
 +
=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:
 +
<pre>API: 3.3.0.203 Database: 3.1.0.0</pre>
  
 
=Sample=
 
=Sample=
Line 26: Line 32:
 
     uint64_t truxton = truxton_create();
 
     uint64_t truxton = truxton_create();
  
     truxton_get_version(truxton, version, sizeof(version));
+
     truxton_get_version( truxton, version, sizeof(version) );
  
     printf("%s\n", version);
+
     printf( "Truxton Version: %s\n", version );
  
     truxton_destroy(truxton);
+
     truxton_destroy( truxton );
  
 
     truxton_stop();
 
     truxton_stop();
 
}
 
}
 
</source>
 
</source>

Revision as of 11:01, 10 February 2021

Retrieves the version of the Truxton application object.

Syntax

void truxton_get_version( uint64_t trutxon_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();
}