Here are some of the device names I have tried, The 'information' is from the device manager for the USB device - Properties/Event screen 2:30:07 PM: Trying to open \.\USB\VID_04B8&PID_112A\583444513131343572 2:30:07 PM: Cannot get a handle for the device. Perhaps it's not attached. 2:30:22 PM: Trying to open \.\VID_04B8&PID_112A\583444513131343572 2:30:22 PM: Cannot get a handle for the device. Perhaps it's not attached. 2:30:39 PM: Trying to open \.\VID_04B8&PID_112A\ 2:30:39 PM: Cannot get a handle...
In this code, it asks for a devicename when trying to open the device. Where do I get the device name? What form does it take? procedure OpenWinUSBDevice(deviceName: String); var hDevice: THandle; begin Info('Trying to open '+deviceName); hDevice := CreateFile( PChar(deviceName), GENERIC_WRITE or GENERIC_READ, FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL or FILE_FLAG_OVERLAPPED, 0); if hDevice = INVALID_HANDLE_VALUE then begin Info('Cannot get a handle for the device....
Problem solved updating info from the sal.h header file from Microsoft
Does anybody know how to modify the header files required from the Visual Studio / WDK to make them compatible with the Embarcadero C++ compiler (BCC32)?
When trying to compile the GetDevPath.CPP file, an error apperas at line 800 in the USB.H header at the following statement: typedef Struct_size_bytes(UrbHeader.Length) struct _URB {