Truxton media get type
Jump to navigation
Jump to search
This retrieves the type of the media.
It corresponds to the MediaTypeID column of the Media table.
It can be one of the defined constants but it must be one of the values in the ID column of the MediaType table.
Syntax
uint64_t truxton_media_get_type( uint64_t media_handle );
Parameters
media_handle
The handle created by the truxton_media_open_id or truxton_media_create call.
Return value
The type of the media.
Sample
1 void print_is_disk(uint64_t media)
2 {
3 uint64_t media_type = truxton_media_get_type( media );
4
5 if ( media_type == MEDIA_TYPE_PHYSICAL_HARD_DISK ||
6 media_type == MEDIA_TYPE_HARD_DISK_IMAGE )
7 {
8 printf( "The media is a hard drive.\n" );
9 }
10 else
11 {
12 printf( "The media is not a hard drive.\n" );
13 }
14 }