<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://truxwiki.com/index.php?action=history&amp;feed=atom&amp;title=Truxton_usb_set_when</id>
	<title>Truxton usb set when - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://truxwiki.com/index.php?action=history&amp;feed=atom&amp;title=Truxton_usb_set_when"/>
	<link rel="alternate" type="text/html" href="https://truxwiki.com/index.php?title=Truxton_usb_set_when&amp;action=history"/>
	<updated>2026-09-09T16:06:01Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://truxwiki.com/index.php?title=Truxton_usb_set_when&amp;diff=3464&amp;oldid=prev</id>
		<title>Sam at 14:58, 26 January 2021</title>
		<link rel="alternate" type="text/html" href="https://truxwiki.com/index.php?title=Truxton_usb_set_when&amp;diff=3464&amp;oldid=prev"/>
		<updated>2021-01-26T14:58:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 14:58, 26 January 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This sets the date and time of when the the USB device was seen.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This sets the date and time of when the the USB device was seen.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It corresponds to the &amp;lt;code&amp;gt;When&amp;lt;/code&amp;gt; column of the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[USBDevice Table|USBDevice]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;  table.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It corresponds to the &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/ins&gt;When&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;&amp;lt;/code&amp;gt; column of the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[USBDevice Table|USBDevice]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;  table.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Syntax=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Syntax=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sam</name></author>
		
	</entry>
	<entry>
		<id>https://truxwiki.com/index.php?title=Truxton_usb_set_when&amp;diff=3463&amp;oldid=prev</id>
		<title>Sam: Created page with &quot;This sets the date and time of when the the USB device was seen. It corresponds to the &lt;code&gt;When&lt;/code&gt; column of the &lt;code&gt;&lt;nowiki&gt;[&lt;/nowiki&gt;USBDevice&lt;no...&quot;</title>
		<link rel="alternate" type="text/html" href="https://truxwiki.com/index.php?title=Truxton_usb_set_when&amp;diff=3463&amp;oldid=prev"/>
		<updated>2021-01-26T14:57:53Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This sets the date and time of when the the USB device was seen. It corresponds to the &amp;lt;code&amp;gt;When&amp;lt;/code&amp;gt; column of the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;a href=&quot;/USBDevice_Table&quot; title=&quot;USBDevice Table&quot;&gt;USBDevice&lt;/a&gt;&amp;lt;no...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This sets the date and time of when the the USB device was seen.&lt;br /&gt;
It corresponds to the &amp;lt;code&amp;gt;When&amp;lt;/code&amp;gt; column of the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[USBDevice Table|USBDevice]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;  table.&lt;br /&gt;
&lt;br /&gt;
=Syntax=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
void truxton_set_when( uint64_t usb_handle, uint64_t ticks );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Parameters=&lt;br /&gt;
==&amp;lt;code&amp;gt;usb_handle&amp;lt;/code&amp;gt;==&lt;br /&gt;
The handle to the USB object.&lt;br /&gt;
This handle comes from calling &amp;lt;code&amp;gt;[[truxton_usb_create]]()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[truxton_child_file_create_usb]]()&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;[[truxton_file_create_usb]]()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;code&amp;gt;ticks&amp;lt;/code&amp;gt;==&lt;br /&gt;
The date in [https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime FILETIME] ticks.&lt;br /&gt;
&lt;br /&gt;
=Sample=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot; highlight=&amp;quot;14&amp;quot;&amp;gt;&lt;br /&gt;
void add_thumb_drive( uint64_t truxton, uint64_t media, uint64_t child_file, uint64_t when, uint64_t where )&lt;br /&gt;
{&lt;br /&gt;
   char media_id[ 65 ];&lt;br /&gt;
   char file_id[ 65 ];&lt;br /&gt;
   char usb_id[ 65 ];&lt;br /&gt;
   &lt;br /&gt;
   truxton_media_get_id( media, media_id, sizeof( media_id ) );&lt;br /&gt;
   truxton_child_file_get_id( child_file, file_id, sizeof( file_id ) );&lt;br /&gt;
&lt;br /&gt;
   uint64_t usb = truxton_usb_create( truxton );&lt;br /&gt;
&lt;br /&gt;
   truxton_usb_set_file_id( usb, file_id );&lt;br /&gt;
   truxton_usb_set_media_id( usb, media_id );&lt;br /&gt;
   truxton_usb_set_when( usb, when );&lt;br /&gt;
   truxton_usb_set_vendor_id( usb, 0x8EC );&lt;br /&gt;
   truxton_usb_set_product_id( usb, 0x16 );&lt;br /&gt;
   truxton_usb_set_file_offset( usb, where );&lt;br /&gt;
&lt;br /&gt;
   // Commit the data to the database&lt;br /&gt;
   if ( truxton_usb_save( usb ) == 0 )&lt;br /&gt;
   {&lt;br /&gt;
      printf( &amp;quot;Cannot save USB to the database\n&amp;quot; );&lt;br /&gt;
   }&lt;br /&gt;
   else&lt;br /&gt;
   {&lt;br /&gt;
      truxton_usb_get_id( usb, usb_id, sizeof( usb_id ) );&lt;br /&gt;
      printf( &amp;quot;USB information saved to record id %s\n&amp;quot;, usb_id );&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   truxton_usb_destroy( usb );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sam</name></author>
		
	</entry>
</feed>