Difference between revisions of "Truxton media get generated files folder id"
Jump to navigation
Jump to search
(Created page with "This retrieves the [https://en.wikipedia.org/wiki/Universally_unique_identifier GUID] of the Generated Files folder in the media. This corresponds to the <code>ID</code> colum...") |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 3: | Line 3: | ||
=Syntax= | =Syntax= | ||
| − | < | + | <source lang="C"> |
void truxton_media_get_generated_files_folder_id( uint64_t media_handle, char * destination_string, size_t max_size ); | void truxton_media_get_generated_files_folder_id( uint64_t media_handle, char * destination_string, size_t max_size ); | ||
| − | </ | + | </source> |
=Parameters= | =Parameters= | ||
| Line 18: | Line 18: | ||
=Sample= | =Sample= | ||
| − | < | + | <source lang="C" highlight="5"> |
| − | uint64_t make_new_generated_file(uint64_t media) | + | uint64_t make_new_generated_file( uint64_t media ) |
{ | { | ||
char guid_string[ 40 ]; | char guid_string[ 40 ]; | ||
| − | truxton_media_get_generated_files_folder_id( media, guid_string, sizeof(guid_string)); | + | truxton_media_get_generated_files_folder_id( media, guid_string, sizeof(guid_string) ); |
uint64_t child_file = truxton_media_add_child( media ) | uint64_t child_file = truxton_media_add_child( media ) | ||
| Line 31: | Line 31: | ||
return( child_file ); | return( child_file ); | ||
} | } | ||
| − | </ | + | </source> |
Latest revision as of 06:45, 10 February 2021
This retrieves the GUID of the Generated Files folder in the media.
This corresponds to the ID column of the File table.
Syntax
void truxton_media_get_generated_files_folder_id( uint64_t media_handle, char * destination_string, size_t max_size );
Parameters
media_handle
The handle created by the truxton_media_open_id or truxton_media_create call.
destination_string
The string to be written to.
max_size
The maximum number of characters that can be written to destination_string.
Sample
uint64_t make_new_generated_file( uint64_t media )
{
char guid_string[ 40 ];
truxton_media_get_generated_files_folder_id( media, guid_string, sizeof(guid_string) );
uint64_t child_file = truxton_media_add_child( media )
truxton_child_file_set_parent_id( child_file, guid_string );
return( child_file );
}