Difference between revisions of "Truxton media get generated files folder id"

From truxwiki.com
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...")
 
Line 18: Line 18:
  
 
=Sample=
 
=Sample=
<syntaxhighlight lang="C" line highlight="5">
+
<syntaxhighlight lang="C" highlight="5">
 
uint64_t make_new_generated_file(uint64_t media)
 
uint64_t make_new_generated_file(uint64_t media)
 
{
 
{

Revision as of 08:41, 26 July 2020

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