Truxton file type open id
Jump to navigation
Jump to search
This opens an existing a file type object. You can use this to get information about a file type.
Syntax
uint64_t truxton_file_type_open_id( uint64_t truxton_handle, uint64_t file_type_id );
Parameters
truxton_handle
The Truxton instance that contains this type of file.
This handle comes from calling truxton_create().
file_type_id
The desired type of file.
Return value
A handle to a file type object.
Sample
void print_mime_type( uint64_t file_type_id )
{
uint64_t truxton = truxton_create();
uint64_t file_type = truxton_file_type_open_id( truxton, file_type_id );
char mime_type[ 128 ];
ZeroMemory( mime_type, sizeof( mime_type) );
truxton_file_type_get_mime_type( file_type, mime_type, sizeof( mime_type) );
printf( "MIME type is %s\n", mime_type);
truxton_file_type_destroy( file_type );
truxton_destroy( truxton );
}