Btw, I could install the driver with the aid of the Toaster sample (as it's
documented in the sample Readme), however, for my application I'd like to
load and unload the driver at runtime, as needed, using the the Service
Control Manager APIs.
So why are devcon.exe, sc.exe, and the Service Control Manager APIs failing?
--
Aram Hăvărneanu
"Aram Hăvărneanu" wrote:
> I have also tried to start it with sc.exe. I have created a service with sc
> create TestSrv type= kernel binPath= \path\to\vhidmini.sys and start the
> service with sc start TestSrv but it fails with:
>
> [SC] StartService FAILED 1058:
>
> The service cannot be started, either because it is disabled or because
> it has n
> o enabled devices associated with it.
>
> --
> Aram Hăvărneanu
>
>
> "Aram Hăvărneanu" wrote:
>
> > I decided to start from the vhidmini sample but I can't install it on Windows
> > 7 32 bit.
> >
> > Y:\ws\kernel\vhidmini>devcon install vhidmini.inf
> > "{D49F883C-6486-400a-8C22-1A9EF48577E4}\HID_DEVICE"
> > Device node created. Install is complete when drivers are updated...
> > Updating drivers for devcon failed.
> >
> > I checked the logs at:
> >
> > %windir%\setupapi.log
> > %windir%\setupact.log
> > %windir%\setuperr.log
> > %windir%\inf\setupapi.app.log
> > %windir%\inf\setupapi.dev.log
> >
> > and I have found this in %windir%\inf\setupapi.dev.log
> >
> > >>> [Device Install (UpdateDriverForPlugAndPlayDevices) - “{D49F883C-6486-400a-8C22-1A9EF48577E4}\HID_DEVICE”]
> > >>> Section start 2009/12/04 15:23:58.556
> > cmd: devcon install vhidmini.inf
> > “{D49F883C-6486-400a-8C22-1A9EF48577E4}\HID_DEVICE”
> > dvi: Set selected driver complete.
> > dvi: {Build Driver List} 15:23:58.618
> > dvi: Searching for hardware ID(s):
> > dvi: “{d49f883c-6486-400a-8c22-1a9ef48577e4}\hid_device”
> > cpy: Policy is set to make all digital signatures equal.
> > dvi: Processing a single INF: 'y:\ws\kernel\vhidmini\vhidmini.inf'
> > inf: Opened INF: 'y:\ws\kernel\vhidmini\vhidmini.inf' ([strings])
> > dvi: {Build Driver List - exit(0x00000000)} 15:23:58.618
> > dvi: {DIF_SELECTBESTCOMPATDRV} 15:23:58.618
> > dvi: No class installer for 'Human Interface Devices'
> > dvi: No CoInstallers found
> > dvi: Default installer: Enter 15:23:58.618
> > dvi: {Select Best Driver}
> > ! dvi: Selecting driver failed(0xe0000228)
> > dvi: {Select Best Driver - exit(0xe0000228)}
> > ! dvi: Default installer: failed!
> > ! dvi: Error 0xe0000228: There are no compatible drivers for this
> > device.
> > dvi: {DIF_SELECTBESTCOMPATDRV - exit(0xe0000228)} 15:23:58.634
> > <<< Section end 2009/12/04 15:23:58.634
> > <<< [Exit status: SUCCESS]
> >
> > What am I missing?
> >
> > Thanks,
> >
> > --
> > Aram Hăvărneanu
> >
> >
> > "Aram Hăvărneanu" wrote:
> >
> > > Hello,
> > >
> > > I wish to develop 2 drivers. One will act as a virtual keyboard and the
> > > other as a virtual mouse.
> > >
> > > Can I start from the vhidmini sample? (src\hid\vhidmini -- it's not
> > > available in the lastest WDK, but it's in 6001.18002). From my understanding
> > > this is a miniclass driver that should work with kbdclass and mouclass, the
> > > class drivers for keyboards and mice. Basically all I would need is to
> > > generate IRPs for the class drivers to process, right?
> > >
> > > I never worked with HID, from my understanding HID drivers don't get IOCTLs,
> > > that's why, if you need to comunicate with the driver, you need to do it some
> > > other way. The vhidmini sample implements such a way. Also, never working
> > > with HID, I don't really know what/how to generate the IRPs.
> > >
> > > One thing I don't understand is how such a driver would work with multiple
> > > sessions.
> > >
> > > Thanks in advance for any resources and documentation!
> > >
> > > --
> > > Aram Hăvărneanu
|