Read and write USB device
-
Hi Geniuses, We have developed an application in VC6.0 to configure a device (with single PCB) thru' serial communication (COM port). Now we need to provide USB interface also. So far I have searched a lot to get the information on handling USB devices in VC++ application. But in vain. If anyone could guide me to get required information, it would be greatly appreciated. Thanks in advance, Sarvan AL
-
Hi Geniuses, We have developed an application in VC6.0 to configure a device (with single PCB) thru' serial communication (COM port). Now we need to provide USB interface also. So far I have searched a lot to get the information on handling USB devices in VC++ application. But in vain. If anyone could guide me to get required information, it would be greatly appreciated. Thanks in advance, Sarvan AL
USB port is not managed the same way as serial port. What you have to do, is open the driver (with CreateFile) that is associated with your device (should have been supplied with the device) and send commands through DeviceIOControl function. All this information should have been supplied also with your device. In a particular case, it can be used like a standard COM port: it is when you use a USB to serial converter. In that case, the driver will create a virtual COM port that you can open like a standard COM port. If you provide more information about the device, it would be nice.
Cédric Moonen Software developer
Charting control -
USB port is not managed the same way as serial port. What you have to do, is open the driver (with CreateFile) that is associated with your device (should have been supplied with the device) and send commands through DeviceIOControl function. All this information should have been supplied also with your device. In a particular case, it can be used like a standard COM port: it is when you use a USB to serial converter. In that case, the driver will create a virtual COM port that you can open like a standard COM port. If you provide more information about the device, it would be nice.
Cédric Moonen Software developer
Charting controlHi Cedric, Thanks a lot for your reply. Let me tell you about the device. It's a box like device with single PCB. As on now, only serial port has been provided. We are not writing the firmware of the device. We are developing only the GUI to configure the device. Hope we need to have the device drivers from the device manufacturer. Could you tell me few more about DeviceIOControl? It would be more helpful to a newbie, like me. Thanks once again, Sarvan AL
-
Hi Cedric, Thanks a lot for your reply. Let me tell you about the device. It's a box like device with single PCB. As on now, only serial port has been provided. We are not writing the firmware of the device. We are developing only the GUI to configure the device. Hope we need to have the device drivers from the device manufacturer. Could you tell me few more about DeviceIOControl? It would be more helpful to a newbie, like me. Thanks once again, Sarvan AL
Yes, but this device provide a USB port no ? With this USB port, there must also be a driver supplied in order to use it on your computer. Can you tell me more about that ? DeviceIOControl[^] but documentation should be supplied with your driver that describes which command to send to the driver.
Cédric Moonen Software developer
Charting control -
Yes, but this device provide a USB port no ? With this USB port, there must also be a driver supplied in order to use it on your computer. Can you tell me more about that ? DeviceIOControl[^] but documentation should be supplied with your driver that describes which command to send to the driver.
Cédric Moonen Software developer
Charting controlHi Cedric, I'd like to know that other than device, what are all the things we should get from the USB device manufacturer, like DLL and LIB files, documents, etc. Since I am new to USB interface, if you could provide still more information, I would be grateful. Thanks & Regards, Sarvan AL
-
Hi Cedric, I'd like to know that other than device, what are all the things we should get from the USB device manufacturer, like DLL and LIB files, documents, etc. Since I am new to USB interface, if you could provide still more information, I would be grateful. Thanks & Regards, Sarvan AL
Please provide more information about this USB device. Did you buy it ? Is it something like a development kit ? If yes, you should have received documentation with. Take a look at it, it will provide much information than I can (every device is specific). But typically, what you should receive is a driver (.sys) and the corresponding INF files (needed for the plug and play) and probably a header file that defines constants to be used with DeviceIOControl.
Cédric Moonen Software developer
Charting control -
Please provide more information about this USB device. Did you buy it ? Is it something like a development kit ? If yes, you should have received documentation with. Take a look at it, it will provide much information than I can (every device is specific). But typically, what you should receive is a driver (.sys) and the corresponding INF files (needed for the plug and play) and probably a header file that defines constants to be used with DeviceIOControl.
Cédric Moonen Software developer
Charting controlHi Cedric, The device with USB interface is under development. As the second phase, we going to develop the GUI application with USB interface. The device manufacturer is our client. So we should be able to tell them the required things to provide us for developing the GUI application. Hope I've explained clearly. Thanks & Regards, Sarvan AL
-
Hi Cedric, The device with USB interface is under development. As the second phase, we going to develop the GUI application with USB interface. The device manufacturer is our client. So we should be able to tell them the required things to provide us for developing the GUI application. Hope I've explained clearly. Thanks & Regards, Sarvan AL
As far as I know, there should be a driver associated with this device. Maybe you should ask them more information about that.
Cédric Moonen Software developer
Charting control -
As far as I know, there should be a driver associated with this device. Maybe you should ask them more information about that.
Cédric Moonen Software developer
Charting control