Difference between revisions of "Truxton message get parent id"
Jump to navigation
Jump to search
(→Sample) |
|||
| Line 1: | Line 1: | ||
This retrieves the [https://en.wikipedia.org/wiki/Universally_unique_identifier GUID] of the parent of the file this message is about. | This retrieves the [https://en.wikipedia.org/wiki/Universally_unique_identifier GUID] of the parent of the file this message is about. | ||
| − | This corresponds to the <code>ID</code> and <code>ParentFileID</code> columns of the <code>[[File Table | File]]</code> table. | + | This corresponds to the <code>[ID]</code> and <code>[ParentFileID]</code> columns of the <code><nowiki>[</nowiki>[[File Table|File]]<nowiki>]</nowiki></code> table. |
=Syntax= | =Syntax= | ||
| Line 18: | Line 18: | ||
=Sample= | =Sample= | ||
| − | + | <source lang="C" highlight="5"> | |
| − | < | + | void print_id(uint64_t message_handle) |
| − | |||
{ | { | ||
char guid_string[ 40 ]; | char guid_string[ 40 ]; | ||
| Line 28: | Line 27: | ||
printf( "Parent File ID is %s\n", guid_string); | printf( "Parent File ID is %s\n", guid_string); | ||
} | } | ||
| − | </ | + | </source> |
Revision as of 14:43, 3 November 2020
This retrieves the GUID of the parent of the file this message is about.
This corresponds to the [ID] and [ParentFileID] columns of the [File] table.
Syntax
void truxton_message_get_parent_id( 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_id(uint64_t message_handle)
{
char guid_string[ 40 ];
truxton_message_get_parent_id( message_handle, guid_string, sizeof(guid_string));
printf( "Parent File ID is %s\n", guid_string);
}