J1081 wrote:a key must be present for the software to start, it is on a thumb drive, currently a USB 2.0 driveĪre you referring to a file on the drive, or is the device in fact a dongle and not really a drive? That would have provided the excellent reason why you must have direct USB access.
Dec 2019, 14:35 Primary OS: MS Windows 10 VBox Version: PUEL Guest OSses: XP Just doing forward thinking about the longevity of this system it would be nice to be able to transfer that key to a USB 3.0 drive. What this all boils down to is that there is some Rockwell Automation software that is needed for this whole system to run, as such a key must be present for the software to start, it is on a thumb drive, currently a USB 2.0 drive. USB access by the VM is important which I have currently via USB 2.0 thumb drives so its not critical to the success of this project. I have some legacy software that interfaces with PLC's and ultimately writes data to a database, otherwise I would not be using Win XP. Shared folder is the way I'm currently using USB 3.0 sticks. The short answer is no there is not particular reason, at this point it's really just a matter of pride not wanting to admit defeat.lol. _tprintf(_T("Failed getting version data from %s.Mpack wrote:Is there some particular reason that XP absolutely must control the USB bit directly?
_tprintf(_T("%s: driver version: %d.%d.%d.%d, firmware version: %x\n"), devIfaceDetailData->DevicePath, If (GetVersion(devIfaceDetailData->DevicePath, &driverVersion, &firmwareVersion)) NUSB3XHC_FIRMWARE_VERSION firmwareVersion If (SetupDiGetDeviceInterfaceDetail(hDevInfo, &devIfaceData, devIfaceDetailData, requiredSize, NULL, NULL)) (PSP_DEVICE_INTERFACE_DETAIL_DATA) malloc(requiredSize) ĭevIfaceDetailData->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA) PSP_DEVICE_INTERFACE_DETAIL_DATA devIfaceDetailData =
returns with ERROR_INSUFFICIENT_BUFFER SetupDiGetDeviceInterfaceDetail(hDevInfo, &devIfaceData, NULL, NULL, &requiredSize, NULL) If (!SetupDiEnumDeviceInterfaces(hDevInfo, NULL, &GUID_DEVINTERFACE_NUSB3XHC, Index, &devIfaceData)) HDEVINFO hDevInfo = SetupDiGetClassDevs(&GUID_DEVINTERFACE_NUSB3XHC, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT) ĭevIfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA) Int crap = IOCTL_NUSB3XHC_GET_FIRMWARE_VERSION Success = success & (returned = sizeof(NUSB3XHC_FIRMWARE_VERSION)) If (DeviceIoControl(hDevice, IOCTL_NUSB3XHC_GET_FIRMWARE_VERSION, NULL, 0, FirmwareVersion, sizeof(NUSB3XHC_FIRMWARE_VERSION), &returned, NULL)) Success = (returned = sizeof(NUSB3XHC_DRIVER_VERSION)) If (DeviceIoControl(hDevice, IOCTL_NUSB3XHC_GET_DRIVER_VERSION, NULL, 0, DriverVersion, sizeof(NUSB3XHC_DRIVER_VERSION), &returned, NULL)) HANDLE hDevice = CreateFile(DevicePath, GENERIC_ALL, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL) #define IOCTL_NUSB3XHC_GET_FIRMWARE_VERSION CTL_CODE(FILE_DEVICE_UNKNOWN, 0x808, METHOD_BUFFERED, FILE_ANY_ACCESS)īOOL GetVersion(LPCTSTR DevicePath, NUSB3XHC_DRIVER_VERSION* DriverVersion, NUSB3XHC_FIRMWARE_VERSION* FirmwareVersion) #define IOCTL_NUSB3XHC_GET_DRIVER_VERSION CTL_CODE(FILE_DEVICE_UNKNOWN, 0x800, METHOD_BUFFERED, FILE_ANY_ACCESS) USHORT BcdVersion // UI displays this as BCD UCHAR Unknown // no idea what this is - on my machine
Here's sample code that opens each Renesas USB Host Controller's device interface and queries the version number. With OSR IrpTracker, I've determined the IOCTL and structure.