Truxton note get text
Jump to navigation
Jump to search
This retrieves the contents of the note.
Syntax
void truxton_note_get_text( uint64_t note_handle, char * destination_string, size_t max_size );
Parameters
note_handle
The handle created by truxton_note_create().
destination_string
The string to be written to.
max_size
The maximum number of characters that can be written to destination_string.
Sample
1 void create_note( void )
2 {
3 uint64_t truxton = truxton_create();
4
5 uint64_t note = truxton_note_create( truxton_handle );
6
7 truxton_note_set_object_id( note, "65feb292-7995-137d-77cb-3ed80000000a" );
8 truxton_note_set_investigation_id( note, "01da7796-a010-3685-0000-018902cb3b22" );
9 truxton_note_set_text( note, "This is an interesting file." );
10 truxton_note_set_object_type( note, OBJECT_TYPE_FILE );
11
12 if ( truxton_note_save( note ) == 0 )
13 {
14 printf( "Cannot save investigation note to the database.\n" );
15 }
16
17 char text[512];
18
19 truxton_note_get_object_id( note, text, sizeof(text) );
20 printf("Note: %s\n", text);
21
22 truxton_note_destroy( note );
23 truxton_destroy( truxton );
24 }