Difference between revisions of "Truxton enumeration destroy"
Jump to navigation
Jump to search
(Created page with "Destroys an enumeration object. =Syntax= <source lang="C"> void truxton_enumeration_destroy( uint64_t enumeration_handle ); </source> =Sample= <source lang="C" highlight="25...") |
(→Sample) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 5: | Line 5: | ||
void truxton_enumeration_destroy( uint64_t enumeration_handle ); | void truxton_enumeration_destroy( uint64_t enumeration_handle ); | ||
</source> | </source> | ||
| + | |||
| + | =Parameters= | ||
| + | ==<code>enumeration_handle</code>== | ||
| + | The handle returned by calling <code>[[truxton_enumeration_create]]()</code>. | ||
=Sample= | =Sample= | ||
| Line 36: | Line 40: | ||
} | } | ||
| − | void main() | + | void main( void ) |
{ | { | ||
char investigation_name[256]; | char investigation_name[256]; | ||
Latest revision as of 10:53, 3 February 2024
Destroys an enumeration object.
Syntax
void truxton_enumeration_destroy( uint64_t enumeration_handle );
Parameters
enumeration_handle
The handle returned by calling truxton_enumeration_create().
Sample
void dump_media_in_investigation( uint64_t truxton_handle, uint64_t investigation_handle )
{
char media_name[ 256 ];
char investigation_id[ 65 ];
truxton_investigation_get_id( investigation_handle, investigation_id, sizeof( investigation_id ) );
uint64_t enumerator = truxton_enumeration_create( truxton );
// Now setup the enumeration to get the media in a particular investigation
truxton_enumeration_set_scope( enumerator, Type_Investigation );
truxton_enumeration_set_scope_id( enumerator, investigation_id );
truxton_enumeration_set_target( enumerator, Type_Media );
uint64_t media_handle = truxton_enumeration_get_next( enumerator );
while( media_handle != 0 )
{
truxton_media_get_name( media_handle, media_name, sizeof( media_name ) );
printf( "Media: %s\n", media_name );
media_handle = truxton_enumeration_get_next( enumerator );
}
truxton_enumeration_destroy( enumerator );
}
void main( void )
{
char investigation_name[256];
truxton_start();
uint64_t truxton = truxton_create();
uint64_t enumerator = truxton_enumeration_create( truxton );
truxton_enumeration_set_target( enumerator, Type_Investigation );
uint64_t investigation_handle = truxton_enumeration_get_next( enumerator );
while( investigation_handle != 0 )
{
truxton_investigation_get_name( investigation_handle, investigation_name, sizeof( investigation_name ) );
printf( "Investigation: %s\n", investigation_name );
dump_media_in_investigation( truxton, investigation_handle );
investigation_handle = truxton_enumeration_get_next( enumerator );
}
truxton_enumeration_destroy( enumerator );
truxton_destroy( truxton );
truxton_stop();
}