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
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
[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.
So why are devcon.exe, sc.exe, and the Service Control Manager APIs failing?
>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 had the same problem with the installation of vhidmini. Don't type
the devcon.exe ..... command directly into the command promp, but
instead create a batch file with this command inside and run it, in
this case it worked for me.
Same error.
--
Aram Hăvărneanu
>
> I had the same problem with the installation of vhidmini. Don't type
> the devcon.exe ..... command directly into the command promp, but
> instead create a batch file with this command inside and run it, in
> this case it worked for me.
> .
>
Didn't work on Windows 7, but worked on Windows 2003 Server x86. How is
running devcon.exe from a bat file any different to running it directly?
Also, I still can't load the driver with the service control manager api,
and although I can test the driver on NT 5.2 installed via bat file that
calls devcon, I need to be able to load it dynamically in my application.
Also, I need Windows Vista and 7.
Thanks,
--
Aram Hăvărneanu
>
> How is
> running devcon.exe from a bat file any different to running it directly?
>
I think I may have an answer, I have copied the devcon line from the docs,
and in the docs it uses smart quotes. The bat file was created manually using
normal quotes. So that's why the bat file worked. If I type correct quotes in
the command line it works as well.
However I still have all the other problems (can't load the driver with the
SCM API, doesn't work on Windows 7, etc).
Thanks,
--
Aram Hăvărneanu
regards
On Sat, 5 Dec 2009 04:10:01 -0800, Aram H?v?rneanu
<AramHv...@discussions.microsoft.com> wrote:
> Have you set the administrative privileges to the devcon.exe into
> windows 7?
Yes, I am running as admin and I have disabled UAC. I checked the logs, and
with that information I was able to load the driver on Windows 7. On 2003, I
was able to install the driver with the inf file and the sys file in the same
directory, however, if I tried to do the same on Windows 7, it didn't work.
Fortunately, the logs were of great help.
> About how to load the driver the source code of devcon
> program are in the DDK, you can study it for understand how this
> software is able to load the driver.
>
I didn't know the source code for devcon was available. I can't find it in
the current WDK. Probably I'm not looking where I need to. The SCM API is
really simple, the problem with the fact that it doesn't work is that I don't
know what to check. Are there any logs I should look into?
Thanks,
--
Aram Hăvărneanu
d
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Aram Hăvărneanu" <AramHv...@discussions.microsoft.com> wrote in message
news:D1887D42-7FCD-47BC...@microsoft.com...
This is by design.
--
Maxim S. Shatskih
Windows DDK MVP
ma...@storagecraft.com
http://www.storagecraft.com