Truxton option get string
Jump to navigation
Jump to search
Reads a string setting.
Contents
Syntax
void truxton_options_get_string( uint64_t options_handle, char const * name, char * destination_string, size_t max_size );
Parameters
options_handle
The handle to the options object created by calling the truxton_options_create function.
name
The name of the option to read.
destination_string
The string to be written to.
max_size
The maximum number of characters that can be written to destination_string
Return value
The value of the setting if specified. If the option name is not found, an empty string is returned.
Sample
void print_starting_MFT( void )
{
char folder_name[ MAX_PATH ];
uint64_t options = truxton_options_create();
truxton_options_get_string( options, "tempdir", folder_name, sizeof( folder_name ) );
printf( "Temporary files will be written to %s\n", folder_name );
truxton_options_destroy( options );
}