Truxton usb get vendor id

From truxwiki.com
Revision as of 14:49, 1 February 2021 by Sam (talk | contribs) (Created page with "This retrieves the identifier of the maker of the USB device. This corresponds to the <code>[VID]</code> column of the <code><nowiki>[</nowiki>USBDevice<no...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This retrieves the identifier of the maker of the USB device. This corresponds to the [VID] column of the [USBDevice] table.

Syntax

void truxton_usb_get_vendor_id( uint64_t usb_handle );

Parameters

usb_handle

This handle comes from calling truxton_usb_create().

Return value

The vendor identifier as stored in the [VID] column in the [USBDevice] table.

Sample

void dump_usb(uint64_t usb_handle)
{
   uint64_t integer_value = 0;

   char temp_string[ 1024 ];

   truxton_usb_get_id( usb_handle, temp_string, sizeof(temp_string) );
   printf( "USB ID is %s\n", temp_string );

   truxton_usb_get_media_id( usb_handle, temp_string, sizeof(temp_string) );
   printf( "Media ID is %s\n", temp_string );

   truxton_usb_get_file_id( usb_handle, temp_string, sizeof(temp_string) );
   printf( "File ID is %s\n", temp_string );

   truxton_usb_get_device_id( usb_handle, temp_string, sizeof(temp_string) );
   printf( "Device ID is \"%s\"\n", temp_string );

   integer_value = truxton_usb_get_device_type( usb_handle );
   printf( "Device type is %" PRIu64 "\n", integer_value );

   integer_value = truxton_usb_get_file_offset( usb_handle );
   printf( "File offset is %" PRIu64 "\n", integer_value );

   integer_value = truxton_usb_get_vendor_id( usb_handle );
   printf( "VID is %" PRIu64 "\n", integer_value );

   integer_value = truxton_usb_get_product_id( usb_handle );
   printf( "PID is %" PRIu64 "\n", integer_value );

   integer_value = truxton_usb_get_revision( usb_handle );
   printf( "Revision is %" PRIu64 "\n", integer_value );

   integer_value = truxton_usb_get_when( usb_handle );
   printf( "When is %" PRIu64 "\n", integer_value );
}