Truxton group destroy

From truxwiki.com
Revision as of 05:52, 30 May 2023 by Sam (talk | contribs) (Created page with "This destroys the group object. =Syntax= <source lang="C"> void truxton_group_destroy( uint64_t group_handle ); </source> =Parameters= ==<code>group_handle</code>== The hand...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This destroys the group object.

Syntax

void truxton_group_destroy( uint64_t group_handle );

Parameters

group_handle

The handle to the group object. This handle comes from calling truxton_group_create().

Sample

void create_my_things(uint64_t investigation_handle)
{
   if (investigation_handle == 0)
   {
      return;
   }

   uint64_t truxton_handle = truxton_investigation_get_truxton( investigation_handle );
   uint64_t group_handle = truxton_group_create( truxton_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_destroy( group_handle );
}