Difference between revisions of "Truxton get version"

From truxwiki.com
Jump to navigation Jump to search
(Created page with "Retrieves the version of the Truxton application object. =Syntax= <syntaxhighlight lang="C"> void truxton_get_version( uint64_t trutxon_handle, char * destination_string, siz...")
 
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
=Syntax=
 
=Syntax=
<syntaxhighlight lang="C">
+
<source lang="C">
void truxton_get_version( uint64_t trutxon_handle, char * destination_string, size_t max_size );
+
void truxton_get_version( uint64_t truxton_handle, char * destination_string, size_t max_size );
</syntaxhighlight>
+
</source>
  
 
=Parameters=
 
=Parameters=
 
==<code>truxton_handle</code>==
 
==<code>truxton_handle</code>==
 
 
The handle created by the [[truxton_create]] call.
 
The handle created by the [[truxton_create]] call.
  
 
==<code>destination_string</code>==
 
==<code>destination_string</code>==
 
 
The string to be written to.
 
The string to be written to.
  
 
==<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=
 
+
<source lang="C" highlight="9">
<syntaxhighlight lang="C" highlight="9">
 
 
void main()
 
void main()
 
{
 
{
Line 29: 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();
 
}
 
}
</syntaxhighlight>
+
</source>

Latest revision as of 16:52, 20 May 2021

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();
}