Difference between revisions of "Truxton file open id"
Jump to navigation
Jump to search
(→Sample) |
|||
| Line 3: | Line 3: | ||
=Syntax= | =Syntax= | ||
<syntaxhighlight lang="C"> | <syntaxhighlight lang="C"> | ||
| − | uint64_t truxton_file_open_id( uint64_t truxton_handle, char const * guid_string ) | + | uint64_t truxton_file_open_id( uint64_t truxton_handle, char const * guid_string ); |
</syntaxhighlight> | </syntaxhighlight> | ||
=Parameters= | =Parameters= | ||
==<code>truxton_handle</code>== | ==<code>truxton_handle</code>== | ||
| − | |||
The handle created by the [[truxton_create]] call. | The handle created by the [[truxton_create]] call. | ||
==<code>guid_string</code>== | ==<code>guid_string</code>== | ||
| − | |||
The string representation of the identifier of the file to get in Truxton. | The string representation of the identifier of the file to get in Truxton. | ||
This corresponds to the <code>ID</code> column of the <code>File</code> table. | This corresponds to the <code>ID</code> column of the <code>File</code> table. | ||
| Line 20: | Line 18: | ||
=Sample= | =Sample= | ||
| − | |||
<syntaxhighlight lang="C" highlight="3"> | <syntaxhighlight lang="C" highlight="3"> | ||
int check_it(uint64_t truxton) | int check_it(uint64_t truxton) | ||
Revision as of 06:54, 10 June 2020
This retrieves a file from Truxton by its GUID.
Syntax
uint64_t truxton_file_open_id( uint64_t truxton_handle, char const * guid_string );
Parameters
truxton_handle
The handle created by the truxton_create call.
guid_string
The string representation of the identifier of the file to get in Truxton.
This corresponds to the ID column of the File table.
Return value
A handle to a read-only file in Truxton.
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)
}