Difference between revisions of "Truxton message get depot name"

From truxwiki.com
Jump to navigation Jump to search
(Created page with "This retrieves the name of the depot file holding the file's contents. =Syntax= <syntaxhighlight lang="C"> void truxton_message_get_depot_filename( uint64_t messa...")
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
This retrieves the name of the [[Depot | depot]] file holding the file's contents.
+
This retrieves the name of the [[Depot|depot]] file holding the file's contents.
  
 
=Syntax=
 
=Syntax=
<syntaxhighlight lang="C">
+
<source lang="C">
void truxton_message_get_depot_filename( uint64_t message_handle, char * destination_string, size_t max_size );
+
void truxton_message_get_depot_name( uint64_t message_handle, char * destination_string, size_t max_size );
</syntaxhighlight>
+
</source>
  
 
=Parameters=
 
=Parameters=
Line 17: Line 17:
  
 
=Sample=
 
=Sample=
 
+
<source lang="C" highlight="5">
<syntaxhighlight lang="C" highlight="5">
+
void print_name( uint64_t message_handle )
int print_name(uint64_t message_handle)
 
 
{
 
{
 
   char filename[ 40 ];
 
   char filename[ 40 ];
  
   truxton_message_get_depot_filename( message_handle, filename, sizeof(filename));
+
   truxton_message_get_depot_name( message_handle, filename, sizeof(filename) );
  
   printf( "Depot file is %s\n", filename);
+
   printf( "Depot file is %s\n", filename );
 
}
 
}
</syntaxhighlight>
+
</source>

Latest revision as of 12:38, 9 February 2021

This retrieves the name of the depot file holding the file's contents.

Syntax

void truxton_message_get_depot_name( uint64_t message_handle, char * destination_string, size_t max_size );

Parameters

message_handle

The handle to a message created by the truxton_message_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

void print_name( uint64_t message_handle )
{
   char filename[ 40 ];

   truxton_message_get_depot_name( message_handle, filename, sizeof(filename) );

   printf( "Depot file is %s\n", filename );
}