Difference between revisions of "Truxton get machine id"
Jump to navigation
Jump to search
(Created page with "Retrieves the version of the Truxton application object. =Syntax= <syntaxhighlight lang="C"> void truxton_get_machine_id( uint64_t trutxon_handle, char * destination_string,...") |
|||
| Line 2: | Line 2: | ||
=Syntax= | =Syntax= | ||
| − | < | + | <source lang="C"> |
void truxton_get_machine_id( uint64_t trutxon_handle, char * destination_string, size_t max_size ); | void truxton_get_machine_id( uint64_t trutxon_handle, char * destination_string, size_t max_size ); | ||
| − | </ | + | </source> |
=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>destination_string</code>== | ==<code>destination_string</code>== | ||
| − | |||
The string to be written to. | The string to be written to. | ||
| Line 19: | Line 17: | ||
=Remarks= | =Remarks= | ||
| − | |||
This identifier is a [https://en.wikipedia.org/wiki/Universally_unique_identifier GUID] retrieved from the <code>MachineGuid</code> value of the <code>HKLM\SOFTWARE\Microsoft\Cryptography</code> key in the [https://en.wikipedia.org/wiki/Windows_Registry registry.] | This identifier is a [https://en.wikipedia.org/wiki/Universally_unique_identifier GUID] retrieved from the <code>MachineGuid</code> value of the <code>HKLM\SOFTWARE\Microsoft\Cryptography</code> key in the [https://en.wikipedia.org/wiki/Windows_Registry registry.] | ||
=Sample= | =Sample= | ||
| − | + | <source lang="C" highlight="9"> | |
| − | < | ||
void main() | void main() | ||
{ | { | ||
| Line 41: | Line 37: | ||
truxton_stop(); | truxton_stop(); | ||
} | } | ||
| − | </ | + | </source> |
Revision as of 11:38, 3 December 2020
Retrieves the version of the Truxton application object.
Contents
Syntax
void truxton_get_machine_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
This identifier is a GUID retrieved from the MachineGuid value of the HKLM\SOFTWARE\Microsoft\Cryptography key in the registry.
Sample
void main()
{
char id[256];
truxton_start();
uint64_t truxton = truxton_create();
truxton_get_machine_id(truxton, id, sizeof(id));
printf("%s\n", id);
truxton_destroy(truxton);
truxton_stop();
}