Difference between revisions of "Truxton media get last updated"

From truxwiki.com
Jump to navigation Jump to search
(Created page with "This retrieves the date when the media last changed. This corresponds to the <code>LastUpdated</code> column of the <code>Media</code> table. =Syntax= <syntaxhighlight lang="...")
 
Line 1: Line 1:
 
This retrieves the date when the media last changed.
 
This retrieves the date when the media last changed.
This corresponds to the <code>LastUpdated</code> column of the <code>Media</code> table.
+
This corresponds to the <code>[LastUpdated]</code> column of the <code>[Media]</code> table.
  
 
=Syntax=
 
=Syntax=
<syntaxhighlight lang="C">
+
<source lang="C">
 
uint64_t truxton_media_get_last_updated( uint64_t media_handle );
 
uint64_t truxton_media_get_last_updated( uint64_t media_handle );
</syntaxhighlight>
+
</source>
  
 
=Parameters=
 
=Parameters=
Line 15: Line 15:
  
 
=Sample=
 
=Sample=
 
+
<source lang="C" highlight="3">
<syntaxhighlight lang="C" highlight="3">
 
 
void print_valid(uint64_t media)
 
void print_valid(uint64_t media)
 
{
 
{
Line 29: Line 28:
 
       printf( "The media has a last update date\n" );
 
       printf( "The media has a last update date\n" );
 
   }
 
   }
}</syntaxhighlight>
+
}</source>

Revision as of 03:46, 13 November 2020

This retrieves the date when the media last changed. This corresponds to the [LastUpdated] column of the [Media] table.

Syntax

uint64_t truxton_media_get_last_updated( uint64_t media_handle );

Parameters

media_handle

The handle created by the truxton_media_open_id or truxton_media_create call.

Return value

The last update date of the media in FILETIME ticks.

Sample

void print_valid(uint64_t media)
{
   uint64_t date = truxton_media_get_last_updated(media);

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