Prev: How to get the value of the prompt environment variable
Next: Multiple CustomTaskPanes in VB6 for Office 2010
From: Dee Earley on 15 Jul 2010 04:43 On 14/07/2010 18:07, Boris P. wrote: > The two controls-thing is interesting. > > Yes, one goes by a USB-to-232 converter, and the other one is called > directly by APIs. > When I attach only one of them, everything goes fine. > > But when I attach both, I get either > > 1) An error in the comm-control, saying that the port is already open, > and when I try to send data, it tells me that the port has to be opened... > > 2) A data when I try to send that data by the APIs, I get an error. > > Is that normal? You are actually specifying a different COM port? Does it work (talking to the correct device) one at a time? -- Dee Earley (dee.earley(a)icode.co.uk) i-Catcher Development Team iCode Systems (Replies direct to my email address will be ignored. Please reply to the group.)
From: Boris P. on 15 Jul 2010 10:42 When talking to the one device using the MSComm control, I have to define the port, yes. And it wouldn't work if I selected the wrong port. When talking to the other device, I cannot specify a (virtual) port, I can only say that I want to use the USB port. Yes, when only one of the two devices is attached, everything runs smoothly.
From: Boris P. on 16 Jul 2010 02:17 I have discovered one problem: I am not able to retrieve the VIRTUAL port of the one device which is talking via the converter and the MSCOMM control. Right now, I can only see to which physical USB port it is connected. I am then trying to open each port, trying to send my data in order to get a reply from the device. Maybe that is the problem... I will have to figure that out first. Does anybody know any code how to retrieve the VIRTUAL comm port, and not only the physical port to which a device is connected? So far I have not been able to find one.
From: Boris P. on 16 Jul 2010 03:31 There is an application which lists all USB devices. This is almost perfect. http://omnibus.uni-freiburg.de/~albers/snippets/usbinfo10.zip The only problem is that I am not able to find out which (I avoid the word "virtual" now because I am not sure if it's correct) comm port. There is another application which does show me the comm port correctly: http://vbcity.com/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.00.65.10.62/DeviceManagerClass.zip I am really wondering why the USBINFO does not show me the comm port although it shows EVERY other information plus lowest level information...
From: Dee Earley on 16 Jul 2010 04:17 On 15/07/2010 15:42, Boris P. wrote: > When talking to the one device using the MSComm control, I have to > define the port, yes. And it wouldn't work if I selected the wrong port. > > When talking to the other device, I cannot specify a (virtual) port, I > can only say that I want to use the USB port. USB communications does not work like that, you communicate with devices, not ports. If there is no virtual serial port created then it is not a serial port device and you will need to talk to the manufacturer for an API. If it does create a virtual port, but only when only one device is plugged in, it is a driver fault (Far too many drivers assume only a single device will exist.) for which you'll also need to chase the manufacturer. -- Dee Earley (dee.earley(a)icode.co.uk) i-Catcher Development Team iCode Systems (Replies direct to my email address will be ignored. Please reply to the group.)
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: How to get the value of the prompt environment variable Next: Multiple CustomTaskPanes in VB6 for Office 2010 |