Prev: Mirror Driver - how to pass Bitmap to user-mode app thought DrvEscape.
Next: Installation failure of the DTM controller
From: chueh8 on 12 Jun 2007 02:53 Hi, sir, I'm writing a serial port HID mini port driver. By using IoOpenDeviceRegistryKey, I can get the handle of the key \HKLM\System\Enum\ACPI\PNP0501\1\Device Parameters. Well, that's not key I want, since our application enumerate our device by HID guid. what the application expect would be the key \HKLM\System\Enum\HID\....\Device Parameters Is it possible by using the same IoOpenDeviceRegistryKey to get that key handle we want? by passing some proper pdo? How to get this pdo? or any other way to do this? Really Thanks. -chueh8
From: Doron Holan [MS] on 13 Jun 2007 02:22 you can't get to any of the enumerated PDOs that HIDclass enumerates as the HID miniport driver. why do you want to get to the PDOs keys? d -- 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. "chueh8" <steelchueh(a)gmail.com> wrote in message news:1181631211.336864.286560(a)r19g2000prf.googlegroups.com... > Hi, sir, > > I'm writing a serial port HID mini port driver. > By using IoOpenDeviceRegistryKey, I can get the handle of the key > \HKLM\System\Enum\ACPI\PNP0501\1\Device Parameters. > > Well, that's not key I want, since our application enumerate our > device by HID guid. > what the application expect would be the key > \HKLM\System\Enum\HID\....\Device Parameters > > Is it possible by using the same IoOpenDeviceRegistryKey to get that > key handle we want? by passing some proper pdo? How to get this > pdo? or any other way to do this? > Really Thanks. > > -chueh8 >
From: chueh8 on 17 Jun 2007 12:23 On 6 13 , 2 22 , "Doron Holan [MS]" <dor...(a)nospam.microsoft.com> wrote: > you can't get to any of the enumerated PDOs that HIDclass enumerates as theHIDminiportdriver. why do you want to get to the PDOs keys? > Since my utility enumerate my device by HID class, and try to save some data in the \HKLM\System\Enum\HID\....\Device Parameters and I'd like to retrieve those registry data from my hid mini port driver by simply calling IoOpenDeviceRegistryKey... -chueh8 > d > > -- > 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. > > "chueh8" <steelch...(a)gmail.com> wrote in message > > news:1181631211.336864.286560(a)r19g2000prf.googlegroups.com... > > > > > Hi, sir, > > > I'm writing a serial portHIDmini portdriver. > > By usingIoOpenDeviceRegistryKey, I can get the handle of the key > > \HKLM\System\Enum\ACPI\PNP0501\1\Device Parameters. > > > Well, that's not key I want, since our application enumerate our > > device byHIDguid. > > what the application expect would be the key > > \HKLM\System\Enum\HID\....\Device Parameters > > > Is it possible by using the sameIoOpenDeviceRegistryKeyto get that > > key handle we want? by passing some proper pdo? How to get this > > pdo? or any other way to do this? > > Really Thanks. > > > -chueh8- - > > - -
From: Eliyas Yakub [MSFT] on 17 Jun 2007 18:35 You cannot do that. As a hidmini port driver, you don't have access to the child PDOs enumerated by the HIDCLASS. You have to use sideband communication channel to provide the information to the miniport driver. Take a look at the firefly sample. It shows how to do this using WMI. That's the only possible approach for a hidmini driver If you can rewrite the driver to use KMDF, you can use rawpdo or controldevice to provide sideband communication. We have a sample in the beta version of Windows Server 2008 WDK called HIDUSBFX2. The beta 3 WDK release is available on the WDK/WLK/WDF connect site now (https://connect.microsoft.com). Even if you are not previously signed up on the beta program, you just need your .NET passport to enroll. This link provided below will provide all the details to enroll & participate. If you do not see Windows Logo Kit (WLK), Windows Driver Kit (WDK) and Windows Driver Framework (WDF) in the Available Connections list, then you are already part of the program. If this is the case: 1. On the left under Connect Home, click My Participation 2. On the Sign In page, enter your ID for Microsoft Connect. 3. On the My Participation page, click the Connection titled Windows Logo Kit (WLK), Windows Driver Kit (WDK) and Windows Driver Framework (WDF). 4. On the left under Connect Home, click Downloads. Once on the downloads page, the first on the list will be "WDK Longhorn Server Beta 3". -Eliyas
From: Eliyas Yakub [MSFT] on 17 Jun 2007 18:46
There is another approach you could try. It's kind of round about but my intuition says it will work. 1) If you know the interface guid registered by the hidclass for your devices, then call IoGetDeviceInterfaceAlias using that. This will give you a list of symboliclink names. 2) Then open the each one by calling IoGetDeviceObjectPointer. This will give the deviceobject of the target device. 3) Using the devicebject, get the underlying PDO by sending a PNP/IRP_MN_QUERY_DEVICE_RELATION (targetrelations) irp. 4) Now use that PDO to read the device properties using IoGetDeviceProperty to make sure that it's indeed your device. 5) Then use that PDO to open the device-registry-key and read the settings. Step 2-5 is demonstrated in a sample called toastmon. -Eliyas "Eliyas Yakub [MSFT]" <eliyasy(a)online.microsoft.com> wrote in message news:%23pSCG$SsHHA.1168(a)TK2MSFTNGP02.phx.gbl... > You cannot do that. As a hidmini port driver, you don't have access to the > child PDOs enumerated by the HIDCLASS. > > You have to use sideband communication channel to provide the information > to the miniport driver. Take a look at the firefly sample. It shows how to > do this using WMI. That's the only possible approach for a hidmini driver > > If you can rewrite the driver to use KMDF, you can use rawpdo or > controldevice to provide sideband communication. We have a sample in the > beta version of Windows Server 2008 WDK called HIDUSBFX2. The beta 3 WDK > release is available on the WDK/WLK/WDF connect site now > (https://connect.microsoft.com). Even if you are not previously signed up > on the beta program, you just need your .NET passport to enroll. This > link provided below will provide all the details to enroll & participate. > If you do not see Windows Logo Kit (WLK), Windows Driver Kit (WDK) and > Windows Driver Framework (WDF) in the Available Connections list, then you > are already part of the program. If this is the case: > 1. On the left under Connect Home, click My Participation > 2. On the Sign In page, enter your ID for Microsoft Connect. > 3. On the My Participation page, click the Connection titled Windows Logo > Kit (WLK), Windows Driver Kit (WDK) and Windows Driver Framework (WDF). > 4. On the left under Connect Home, click Downloads. > > Once on the downloads page, the first on the list will be "WDK Longhorn > Server Beta 3". > > -Eliyas |