|
From: flashlib on 22 Apr 2008 21:15 On 4æ22æ¥, ä¸å12æ¶24å, "Ben Voigt [C++ MVP]" <r...(a)nospam.nospam> wrote: > flash...(a)gmail.com wrote: > > On 4?17?, ??11?02?, "Ben Voigt [C++ MVP]" <r...(a)nospam.nospam> wrote: > >> flash...(a)gmail.com wrote: > >>> On 4ÃÃ16ÃÃ, ÃÃÃç9ñ26·Ã, chris.aselt...(a)gmail.com wrote: > >>>> On Apr 13, 10:21 pm, flash...(a)gmail.com wrote: > > >>>>> hDeviceHandle=CreateFile( > >>>>> szDevicePath[i], > >>>>> GENERIC_READ | GENERIC_WRITE, > >>>>> 0,//FILE_SHARE_READ | > >>>>> FILE_SHARE_WRITE, NULL, > >>>>> OPEN_EXISTING, > >>>>> FILE_FLAG_OVERLAPPED | > >>>>> FILE_ATTRIBUTE_NORMAL, NULL > >>>>> ); > > >>>>> /////////////////////////////////////////////// // it failed here, > >>>>> always return ERROR_FILE_NOT_FOUND > >>>>> /////////////////////////////////////////////// > > >>>> For every case that you get ERROR_NOT_FILE_FOUND, give us a dump of > >>>> szDevicePath[i] please. My guess is that you've mangled it > >>>> somehow. > > >>> Hi Chris, > > >>> Thanks for your attention! The szDevicePath[i] is as following: > >>> "\\? > >>> \usb#vid_abcd&pid_1234#5&25c045bb&0&1#{a5dcbf10-6530-11d2-901f-00c04fb951ed}" > > >> Check UNICODE vs single byte? > > >>> Thanks. > > > Hi Ben, > > > I tried both Unicode and single byte, the result is the same. Any more > > suggestion would be greate appreciated! > > Just that I've only seen the "\\?\" prefix discussed with the Unicode > version, CreateFileW. But your variable naming suggested you are using > single byte characters. Yes ,the naming is not very suitable. But I defined it using TCHAR: TCHAR* szDevicePath[MAX_DEVICE]; // device path So, when I set to Unicode mode, it is a real unicode variable.
From: Tim Roberts on 23 Apr 2008 22:51 flashlib(a)gmail.com wrote: > >It's a usb video device, I also tried to use the class GUID of >DEFINE_GUID(CameraClassGuid, 0x6bdd1fc6, 0x810f, 0x11d0, 0xbe, 0xc7, >0x08, 0x00, 0x2b, 0xe2, 0x09, 0x2f); // image camera >But the result is the same! If it is truly a USB video class device, then it is designed to be opened by ksproxy.ax as part of a DirectShow graph, not directly by user-mode applications. What were you planning to do with this when you got it open? -- Tim Roberts, timr(a)probo.com Providenza & Boekelheide, Inc.
From: flashlib on 29 Apr 2008 23:24 On 4ÔÂ24ÈÕ, ÉÏÎç10ʱ51·Ö, Tim Roberts <t...(a)probo.com> wrote: > flash...(a)gmail.com wrote: > > >It's a usb video device, I also tried to use the class GUID of > >DEFINE_GUID(CameraClassGuid, 0x6bdd1fc6, 0x810f, 0x11d0, 0xbe, 0xc7, > >0x08, 0x00, 0x2b, 0xe2, 0x09, 0x2f); // image camera > >But the result is the same! > > If it is truly a USB video class device, then it is designed to be opened > by ksproxy.ax as part of a DirectShow graph, not directly by user-mode > applications. What were you planning to do with this when you got it open? > -- > Tim Roberts, t...(a)probo.com > Providenza & Boekelheide, Inc. Hi Tim, Sorry for my late reply since I can't log in my account for days! My purpose is to read/write registers of the camera which is down by another tool. I captured the USB signal with BusHound, and I find BusHound can send the same command to the device, how can it do that? Jacky
From: Tim Roberts on 30 Apr 2008 00:50 flashlib(a)gmail.com wrote: > >Sorry for my late reply since I can't log in my account for days! >My purpose is to read/write registers of the camera which is down by >another tool. I captured the USB signal with BusHound, and I find >BusHound can send the same command to the device, how can it do that? BusHound inserts a class upper filter driver immediately above the USB host controller. It is injecting USB requests directly into the host controller. Such a mechanism is not suitable for a production driver. You can't tell how you might be interfering with the regular driver. -- Tim Roberts, timr(a)probo.com Providenza & Boekelheide, Inc.
From: flashlib on 2 May 2008 01:44 On 4ÔÂ30ÈÕ, ÏÂÎç12ʱ50·Ö, Tim Roberts <t...(a)probo.com> wrote: > flash...(a)gmail.com wrote: > > >Sorry for my late reply since I can't log in my account for days! > >My purpose is to read/write registers of the camera which is down by > >another tool. I captured the USB signal with BusHound, and I find > >BusHound can send the same command to the device, how can it do that? > > BusHound inserts a class upper filter driver immediately above the USB host > controller. It is injecting USB requests directly into the host > controller. Such a mechanism is not suitable for a production driver. You > can't tell how you might be interfering with the regular driver. > -- > Tim Roberts, t...(a)probo.com > Providenza & Boekelheide, Inc. I got it. Thanks very much for your help.
First
|
Prev
|
Pages: 1 2 3 4 5 Prev: WDF API vs WDM API Next: Bluetooth SCO connection requires developing kernel driver? |