Difference between revisions of "Truxton get device id"
Jump to navigation
Jump to search
(→Sample) |
|||
| Line 38: | Line 38: | ||
truxton_get_device_id( truxton, id, sizeof(id) ); | truxton_get_device_id( truxton, id, sizeof(id) ); | ||
| − | printf("%s\n", id); | + | printf( "%s\n", id ); |
truxton_destroy( truxton ); | truxton_destroy( truxton ); | ||
Revision as of 11:04, 10 February 2021
Retrieves the identifier of the hardware Truxton is running on.
Contents
Syntax
void truxton_get_device_id( uint64_t trutxon_handle, char * destination_string, size_t max_size );
Parameters
truxton_handle
The handle created by the truxton_create call.
destination_string
The string to be written to.
max_size
The maximum number of characters that can be written to destination_string
Remarks
A device ID in Truxton is a GUID that uniquely identifies the hardware.
The source of this identifier is the BIOS of the computer running your program.
It can be retrieved using wmic using these parameters:
wmic path Win32_ComputerSystemProduct get UUID
This identifier is also written to the bios_id field of the header of a Depot File.
Sample
void main()
{
char id[256];
truxton_start();
uint64_t truxton = truxton_create();
truxton_get_device_id( truxton, id, sizeof(id) );
printf( "%s\n", id );
truxton_destroy( truxton );
truxton_stop();
}