<?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_identify_bytes</id>
	<title>Truxton identify bytes - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://truxwiki.com/index.php?action=history&amp;feed=atom&amp;title=Truxton_identify_bytes"/>
	<link rel="alternate" type="text/html" href="https://truxwiki.com/index.php?title=Truxton_identify_bytes&amp;action=history"/>
	<updated>2026-09-09T21:02:51Z</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_identify_bytes&amp;diff=6103&amp;oldid=prev</id>
		<title>Sam: Created page with &quot;Given file contents, this function will determine the type the file.  =Syntax= &lt;source lang=&quot;C&quot;&gt; uint32_t truxton_identify_bytes(uint8_t const* buffer...&quot;</title>
		<link rel="alternate" type="text/html" href="https://truxwiki.com/index.php?title=Truxton_identify_bytes&amp;diff=6103&amp;oldid=prev"/>
		<updated>2023-01-12T11:13:25Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Given file contents, this function will determine the &lt;a href=&quot;/File_Types_Supported&quot; title=&quot;File Types Supported&quot;&gt;type&lt;/a&gt; the file.  =Syntax= &amp;lt;source lang=&amp;quot;C&amp;quot;&amp;gt; uint32_t truxton_identify_bytes(uint8_t const* buffer...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Given file contents, this function will determine the [[File Types Supported|type]] the file.&lt;br /&gt;
&lt;br /&gt;
=Syntax=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
uint32_t truxton_identify_bytes(uint8_t const* buffer, uint64_t buffer_size);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Return value=&lt;br /&gt;
The [[File Types Supported|type]] of the file in &amp;lt;code&amp;gt;buffer&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Sample=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot; highlight=&amp;quot;10&amp;quot;&amp;gt;&lt;br /&gt;
void main()&lt;br /&gt;
{&lt;br /&gt;
   uint8_t * file_buffer = nullptr;&lt;br /&gt;
   uint64_t file_size = 0;&lt;br /&gt;
&lt;br /&gt;
   uint32_t file_type = Type_64bit_Windows_Executable;&lt;br /&gt;
&lt;br /&gt;
   get_file_contents( &amp;quot;KERNEL32.DLL&amp;quot;, &amp;amp;file_buffer, &amp;amp;file_size );&lt;br /&gt;
&lt;br /&gt;
   uint32_t file_type = truxton_identify_bytes( file_buffer, file_size );&lt;br /&gt;
&lt;br /&gt;
   printf( &amp;quot;%u\n&amp;quot;, file_type );&lt;br /&gt;
&lt;br /&gt;
   free( file_buffer );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sam</name></author>
		
	</entry>
</feed>