Re: CreateFile for USB device returns ERROR_FILE_NOT_FOUND
- From: "Doron Holan [MSFT]" <doronh@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 10 Apr 2008 21:13:00 -0700
the way the device is connected does not effect how it allows handles to be created. are you using a different device interface guid for each?
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Sam Zehr" <Sam Zehr@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:E38A0A46-9E6F-4ED5-9205-E41461E20D96@xxxxxxxxxxxxxxxx
Hi.
I am trying to communicate directly with a USB webcam. (I know there are
easier ways to run a webcam, but I have my reasons :)
I am enumerating the USB devices, and getting the path with
SetupDiGetDeviceInterfaceDetail
I am able to get a valid handle to a thumb drive and USB keyboard with my
code, and the mouse returns ERROR_GEN_FAILURE, which is becuase the system
locks it, if I understand correctly.
Both the webcam and my gamepad return ERROR_FILE_NOT_FOUND from CreateFile.
The DevicePath seems to be correct, becuase I can get a handle to some
devices, and I seem to have the right device, because
SetupDiGetDeviceRegistryProperty is returning correct values.
What would cause CreateFile to not get a valid handle on some USB devices?
Thanks
Sam
.
- Follow-Ups:
- References:
- CreateFile for USB device returns ERROR_FILE_NOT_FOUND
- From: Sam Zehr
- CreateFile for USB device returns ERROR_FILE_NOT_FOUND
- Prev by Date: CreateService needs restart of the box
- Next by Date: Re: can I call a function exported by a DLL in the remote process?
- Previous by thread: CreateFile for USB device returns ERROR_FILE_NOT_FOUND
- Next by thread: Re: CreateFile for USB device returns ERROR_FILE_NOT_FOUND
- Index(es):
Relevant Pages
|