From: Jake on 7 Dec 2009 19:35 Scene: Multiple devices with the same GUID attached to a machine. They report serial numbers and that is a known-working configuration. As I understand it, the proper way to iterate serial numbers is basically: 1. SetupDiGetClassDevs with the GUID then iterate: 1.a. getDevicePath(n++) 1.b. hDev = CreateFile() 1.c. hUsb = WinUsb_Initialize(hDev) 1.d. WinUsb_GetDescriptor(hUsb) This works fine. However, a problem occurs when one of these devices is then opened (or shall I say, left open because the calls above actually "open" the device). The NEXT time the above block is called, the device that is open cannot be opened again. The call in 1. Lists all the devices. The call in 1.a. also succeeds. The call in 1.b. fails. It returns an INVALID_HANDLE_VALUE and the last error is ERROR_ACCESS_DENIED. The CreateFile was called with GENERIC_WRITE|GENERIC_READ and FILE_SHARE_WRITE|FILE_SHARE_READ. Is there an alternate way to iterate serial numbers of attached devices that does not require them to be opened? Or is there an alternate way to open the device which does not prevent access to iterate them.
From: Pavel A. on 10 Dec 2009 12:07 "Tim Roberts" <timr(a)probo.com> wrote in message news:pn21i5d8ndaku4hn246pa9cnpu128m1ffb(a)4ax.com... .................. > It's unusual to WANT to identify specific instances. That's my point. > For > most devices, if I have serial number 18 and serial number 74 plugged in, > I > don't do anything any different than if I have serial number 19 and serial > number 75. If I have 6 web cameras, I want to be able to address each > one, > but I don't care which SPECIFIC camera each one is. This may be needed for association of the instances with data stored somewhere else. For example, USB network adapter has associated configuration (dhcp and so on) which is stored in the tcpip registry branch, away from the driver PnP reg. keys. An adapter with the serial number is associated with it's existing config, no matter where it is attached. If the OP has this need, it can be addressed in exactly same way: the software detects a new instance, it assigns it a unique "configuration id" and uses it as a key to link to it's own data. Regards, P.
From: Jake on 22 Dec 2009 21:22 "Tim Roberts" wrote: > number 75. If I have 6 web cameras, I want to be able to address each one, > but I don't care which SPECIFIC camera each one is. > > What kind of devices are these? (annoyed that I'm not getting automatic emails when responses are posted) Using your example, you would want to if these cameras were part of a motion capture setup and had specific locations tied to them. Or, simplifying, just a left and right for a stereo setup. I guess I don't see why any of the details of the implementation requirements really matters here. I'm just trying to iterate serial numbers while a device is already "open" within WinUSB. This should certainly be possible and, if not, I think it represents a bug somewhere, or at least a deficiency. I know that it is possible using a different driver implementation that I've used in the past, so it may simply be a known deficiency in WinUSB, but it would be nice to see that written somewhere. And it would be nice to have that deficiency resolved. How do we elevate something like this using one of our "MSDN incidents" ? I've never used one, but this seems like the right time since no one from MS is chiming in here.
From: David Craig on 22 Dec 2009 22:28 1. MSDN managed newsgroups are going away. The latest from MSDN says the forums will be the only supported free place to get answers in 2 days. 2. As has been asked many times in the past, what do you plan to do with the serial number? Why can't 1, 2, 3, etc. be used? What happens if they replace the device and all serial numbers change? I don't know much if anything about USB cameras except I like my MS 5000 and gave my daughter the MS 6000 that I thought had inferior video quality when compared with the 5000. My new notebook will have a camera at the top of the screen, so I can use the MS 5000 when the laptop is closed and an external monitor/KVM is being used. I do see a need on one of my systems to know the serial number, but it also happens to be printed on the Seagate HD as well. It has failed and since that box has six of those drives in it, the serial number is useful. Maybe that could apply in your case, but I have never seen the serial number given on a webcam where you can read it from the label. "Jake" <Jake(a)discussions.microsoft.com> wrote in message news:34673D26-9F62-4B8E-91AB-F47C96054B3A(a)microsoft.com... > > > "Tim Roberts" wrote: >> number 75. If I have 6 web cameras, I want to be able to address each >> one, >> but I don't care which SPECIFIC camera each one is. >> >> What kind of devices are these? > > (annoyed that I'm not getting automatic emails when responses are posted) > > Using your example, you would want to if these cameras were part of a > motion > capture setup and had specific locations tied to them. Or, simplifying, > just > a left and right for a stereo setup. > > I guess I don't see why any of the details of the implementation > requirements really matters here. > > I'm just trying to iterate serial numbers while a device is already "open" > within WinUSB. This should certainly be possible and, if not, I think it > represents a bug somewhere, or at least a deficiency. > > I know that it is possible using a different driver implementation that > I've > used in the past, so it may simply be a known deficiency in WinUSB, but it > would be nice to see that written somewhere. And it would be nice to have > that deficiency resolved. > > How do we elevate something like this using one of our "MSDN incidents" ? > I've never used one, but this seems like the right time since no one from > MS > is chiming in here.
From: Pavel A. on 22 Dec 2009 22:26 "Jake" <Jake(a)discussions.microsoft.com> wrote in message news:34673D26-9F62-4B8E-91AB-F47C96054B3A(a)microsoft.com... > How do we elevate something like this using one of our "MSDN incidents" ? > I've never used one, but this seems like the right time since no one from > MS > is chiming in here. Log on to the msdn site, then click on Support Incidents link in the MSDN Subscriptions box on the right side, or Online concierge chat. Good luck, --pa
|
Next
|
Last
Pages: 1 2 3 4 Prev: Contiguous Memory allocation Next: A KeQuerySystemTime alternate function under x64 ? |