Difference between revisions of "Truxton media get created"

From truxwiki.com
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
This retrieves the create date of the media.
 
This retrieves the create date of the media.
This corresponds to the <code>Created</code> column of the <code>Media</code> table.
+
This corresponds to the <code>[Created]</code> column of the <code><nowiki>[</nowiki>[[Media Table|Media]]<nowiki>]</nowiki></code> table.
 
It represents when this media was created in Truxton.
 
It represents when this media was created in Truxton.
  
 
=Syntax=
 
=Syntax=
<syntaxhighlight lang="C">
+
<source lang="C">
 
uint64_t truxton_media_get_created( uint64_t media_handle );
 
uint64_t truxton_media_get_created( uint64_t media_handle );
</syntaxhighlight>
+
</source>
  
 
=Parameters=
 
=Parameters=
Line 16: Line 16:
  
 
=Sample=
 
=Sample=
 
+
<source lang="C" highlight="3">
<syntaxhighlight lang="C" highlight="3">
+
void print_valid( uint64_t media )
void print_valid(uint64_t media)
 
 
{
 
{
   uint64_t creation_date = truxton_media_get_created(media);
+
   uint64_t creation_date = truxton_media_get_created( media );
  
 
   if ( creation_date == 0 )
 
   if ( creation_date == 0 )
Line 30: Line 29:
 
       printf( "The media has a creation date\n" );
 
       printf( "The media has a creation date\n" );
 
   }
 
   }
}</syntaxhighlight>
+
}</source>

Latest revision as of 07:39, 3 February 2024

This retrieves the create date of the media. This corresponds to the [Created] column of the [Media] table. It represents when this media was created in Truxton.

Syntax

uint64_t truxton_media_get_created( uint64_t media_handle );

Parameters

media_handle

The handle created by the truxton_media_open_id or truxton_media_create call.

Return value

The creation date of the media in FILETIME ticks.

Sample

void print_valid( uint64_t media )
{
   uint64_t creation_date = truxton_media_get_created( media );

   if ( creation_date == 0 )
   {
      printf( "The media has no creation date\n" );
   }
   else
   {
      printf( "The media has a creation date\n" );
   }
}