Truxton file free

From truxwiki.com
Revision as of 17:15, 2 June 2020 by Sam (talk | contribs) (Created page with "Closes and frees any resources associated with a Truxton file object. =Syntax= <syntaxhighlight lang="C"> void truxton_file_free( uint64_t file_handle ) </syntaxhighlight> =...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Closes and frees any resources associated with a Truxton file object.

Syntax

void truxton_file_free( uint64_t file_handle )

Parameters

file_handle

The handle created by the truxton_file_open_id of truxton_file_open_md5 call. After this call, the file_handle is no longer valid.

Sample

int check_it(uint64_t truxton)
{
   uint64_t file = truxton_file_open_id(truxton, "5ed3aeb7-3da4-5f5c-8c8f-af5200000000");

   if ( file != 0 )
   {
      return(0);
   }

   truxton_file_close(file);
   truxton_file_free(file);

   return(1)
}