Difference between revisions of "Truxton group get investigation id"
Jump to navigation
Jump to search
(Created page with "This retrieves the globally unique identifier of the investigation this group belongs to. This corresponds to the <code>[InvestigationID]</code> column of the <code>[Group]</c...") |
|||
| Line 9: | Line 9: | ||
=Parameters= | =Parameters= | ||
==<code>group_handle</code>== | ==<code>group_handle</code>== | ||
| − | The handle created by <code>[[truxton_group_create]]() or <code>[[truxton_investigation_create_group]] | + | The handle created by <code>[[truxton_group_create]]()</code> or <code>[[truxton_investigation_create_group]]()</code>. |
==<code>destination_string</code>== | ==<code>destination_string</code>== | ||
Latest revision as of 06:04, 11 April 2024
This retrieves the globally unique identifier of the investigation this group belongs to.
This corresponds to the [InvestigationID] column of the [Group] table.
Syntax
void truxton_group_get_investigation_id( uint64_t group_handle, char * destination_string, size_t max_size );
Parameters
group_handle
The handle created by truxton_group_create() or truxton_investigation_create_group().
destination_string
The string to be written to.
max_size
The maximum number of characters that can be written to destination_string.
Sample
void create_my_things( uint64_t investigation_handle )
{
if (investigation_handle == 0)
{
return;
}
uint64_t group_handle = truxton_investigation_create_group( investigation_handle);
truxton_group_set_name( group_handle, "My Things" );
truxton_group_set_description( group_handle, "These are my things" );
truxton_group_set_is_default( group_handle, 1 );
truxton_group_set_type( group_handle, GROUP_TYPE_USER );
if ( truxton_group_save( group_handle ) != 0 )
{
char guid[MINIMUM_GUID_STRING_BUFFER_SIZE + 5];
truxton_group_get_id( group_handle, guid, sizeof(guid) );
truxton_investigation_set_active_group_id( investigation_handle, guid );
truxton_group_get_investigation_id( group, guid, sizeof(guid) );
printf( "Investigation: %s\n", guid );
}
truxton_group_destroy( group_handle );
}