Joystick device driver

Good morning all. I’ve been trying to get going on a driver for a USB device I’ve built for some time, but always got stopped by something. I’m determined this time! I’m fairly new to device drivers, but have been able to write a driver that installs, and gives me debug output at the various stages of driver loading and unloading.

The device is a joystick-type device, and I’d like it to be installed into Game Controllers when it’s plugged in. Right now, the driver is a direct-interface one, where I have to write a program to use its API. I can talk to the device, but I’d like it to look like a standard joystick to Windows.

I can’t change the HID coming from the device. So I’m trying to use the sample in \WINDDK\2600.1106\src\wdm\hid\hidgame as a base to write my own driver, but I’m not sure what goes where, and it doesn’t compile. The documentation just says, “Type BUILD,” which does not exist on my system. The doc also says to use diquick.exe to test it, but diquick.exe is not included with the XP DDK, nor is it in the DirectX 9.0c SDK. Grrrr…

Any help is greatly appreciated.

Thanks,

-Joe Fisher

-Joe

I don’t think hidgame is the driver at which you want to use. First, you should get the latest DDK, server 2003 sp1. if you download KMDF at http://www.microsoft.com/whdc/driver/wdf/KMDF_pkg.mspx you get it for free w/out waiting for shipping. Second, hidgame is a polling hid miniport based on the old 0x201 analog game port, not the best sample to work with.

Does your device get reported as a HID device to the OS? What part of the HID’ness do you want to change?

d


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Joe Fisher
Sent: Monday, May 01, 2006 7:11 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Joystick device driver

Good morning all.? I’ve been trying to get going on a driver for a USB device I’ve built for some time, but always got stopped by something.? I’m determined this time!? I’m fairly new to device drivers, but have been able to write a driver that installs, and gives me debug output at the various stages of driver loading and unloading.
?
The device is a joystick-type device, and I’d like it to be installed into Game Controllers when it’s plugged in.? Right now, the driver is a direct-interface one, where I have to write a program to use its API.? I can talk to the device, but I’d like it to look like a standard joystick to Windows.
?
I can’t change the HID coming from the device.? So I’m trying to use the sample in \WINDDK\2600.1106\src\wdm\hid\hidgame as a base to write my own driver, but I’m not sure what goes where, and it doesn’t compile.? The documentation just says, “Type BUILD,” which does not exist on my system.? The doc also says to use diquick.exe to test it, but diquick.exe is not included with the XP DDK, nor is it in the DirectX 9.0c SDK.? Grrrr…
?
Any help is greatly appreciated.
?
Thanks,
?
-Joe Fisher
?
-Joe


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

That’s just the problem: it doesn’t get reported as an HID device, and I
cannot change the USB descriptor coming from the hardware in the device.

So what type of driver do I need to build, then? I figured I’d have to
build some sort of filter driver, but I can’t find any information on how to
build a driver that gets installed into Game Controllers.

Thanks,

-Joe

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Monday, May 01, 2006 10:47 AM
Subject: RE: [ntdev] Joystick device driver

I don’t think hidgame is the driver at which you want to use. First, you
should get the latest DDK, server 2003 sp1. if you download KMDF at
http://www.microsoft.com/whdc/driver/wdf/KMDF_pkg.mspx you get it for free
w/out waiting for shipping. Second, hidgame is a polling hid miniport based
on the old 0x201 analog game port, not the best sample to work with.

Does your device get reported as a HID device to the OS? What part of the
HID’ness do you want to change?

d

________________________________________
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joe Fisher
Sent: Monday, May 01, 2006 7:11 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Joystick device driver

Good morning all. I’ve been trying to get going on a driver for a USB device
I’ve built for some time, but always got stopped by something. I’m
determined this time! I’m fairly new to device drivers, but have been able
to write a driver that installs, and gives me debug output at the various
stages of driver loading and unloading.

The device is a joystick-type device, and I’d like it to be installed into
Game Controllers when it’s plugged in. Right now, the driver is a
direct-interface one, where I have to write a program to use its API. I can
talk to the device, but I’d like it to look like a standard joystick to
Windows.

I can’t change the HID coming from the device. So I’m trying to use the
sample in \WINDDK\2600.1106\src\wdm\hid\hidgame as a base to write my own
driver, but I’m not sure what goes where, and it doesn’t compile. The
documentation just says, “Type BUILD,” which does not exist on my system.
The doc also says to use diquick.exe to test it, but diquick.exe is not
included with the XP DDK, nor is it in the DirectX 9.0c SDK. Grrrr…

Any help is greatly appreciated.

Thanks,

-Joe Fisher

-Joe


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

In that case, you can write your own HID minidriver. Vhidmini from the
DDK is a good start. You will then have to fake out a HID descriptor
and transform all the data to HID in the minidriver before reporting it
back to HIDclass.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joe Fisher
Sent: Monday, May 01, 2006 8:19 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Joystick device driver

That’s just the problem: it doesn’t get reported as an HID device, and I

cannot change the USB descriptor coming from the hardware in the device.

So what type of driver do I need to build, then? I figured I’d have to
build some sort of filter driver, but I can’t find any information on
how to
build a driver that gets installed into Game Controllers.

Thanks,

-Joe

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Monday, May 01, 2006 10:47 AM
Subject: RE: [ntdev] Joystick device driver

I don’t think hidgame is the driver at which you want to use. First,
you
should get the latest DDK, server 2003 sp1. if you download KMDF at
http://www.microsoft.com/whdc/driver/wdf/KMDF_pkg.mspx you get it for
free
w/out waiting for shipping. Second, hidgame is a polling hid miniport
based
on the old 0x201 analog game port, not the best sample to work with.

Does your device get reported as a HID device to the OS? What part of
the
HID’ness do you want to change?

d

________________________________________
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joe Fisher
Sent: Monday, May 01, 2006 7:11 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Joystick device driver

Good morning all. I’ve been trying to get going on a driver for a USB
device
I’ve built for some time, but always got stopped by something. I’m
determined this time! I’m fairly new to device drivers, but have been
able
to write a driver that installs, and gives me debug output at the
various
stages of driver loading and unloading.

The device is a joystick-type device, and I’d like it to be installed
into
Game Controllers when it’s plugged in. Right now, the driver is a
direct-interface one, where I have to write a program to use its API. I
can
talk to the device, but I’d like it to look like a standard joystick to
Windows.

I can’t change the HID coming from the device. So I’m trying to use the
sample in \WINDDK\2600.1106\src\wdm\hid\hidgame as a base to write my
own
driver, but I’m not sure what goes where, and it doesn’t compile. The
documentation just says, “Type BUILD,” which does not exist on my
system.
The doc also says to use diquick.exe to test it, but diquick.exe is not
included with the XP DDK, nor is it in the DirectX 9.0c SDK. Grrrr…

Any help is greatly appreciated.

Thanks,

-Joe Fisher

-Joe


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Thanks.

My XP DDK doesn’t contain the sample code you mentioned. I’m downloading
the iso image at the link you posted earlier.

What is WDF? Is it anything like WDM?

-Joe

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Monday, May 01, 2006 11:23 AM
Subject: RE: [ntdev] Joystick device driver

In that case, you can write your own HID minidriver. Vhidmini from the
DDK is a good start. You will then have to fake out a HID descriptor
and transform all the data to HID in the minidriver before reporting it
back to HIDclass.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joe Fisher
Sent: Monday, May 01, 2006 8:19 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Joystick device driver

That’s just the problem: it doesn’t get reported as an HID device, and I

cannot change the USB descriptor coming from the hardware in the device.

So what type of driver do I need to build, then? I figured I’d have to
build some sort of filter driver, but I can’t find any information on
how to
build a driver that gets installed into Game Controllers.

Thanks,

-Joe

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Monday, May 01, 2006 10:47 AM
Subject: RE: [ntdev] Joystick device driver

I don’t think hidgame is the driver at which you want to use. First,
you
should get the latest DDK, server 2003 sp1. if you download KMDF at
http://www.microsoft.com/whdc/driver/wdf/KMDF_pkg.mspx you get it for
free
w/out waiting for shipping. Second, hidgame is a polling hid miniport
based
on the old 0x201 analog game port, not the best sample to work with.

Does your device get reported as a HID device to the OS? What part of
the
HID’ness do you want to change?

d

________________________________________
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joe Fisher
Sent: Monday, May 01, 2006 7:11 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Joystick device driver

Good morning all. I’ve been trying to get going on a driver for a USB
device
I’ve built for some time, but always got stopped by something. I’m
determined this time! I’m fairly new to device drivers, but have been
able
to write a driver that installs, and gives me debug output at the
various
stages of driver loading and unloading.

The device is a joystick-type device, and I’d like it to be installed
into
Game Controllers when it’s plugged in. Right now, the driver is a
direct-interface one, where I have to write a program to use its API. I
can
talk to the device, but I’d like it to look like a standard joystick to
Windows.

I can’t change the HID coming from the device. So I’m trying to use the
sample in \WINDDK\2600.1106\src\wdm\hid\hidgame as a base to write my
own
driver, but I’m not sure what goes where, and it doesn’t compile. The
documentation just says, “Type BUILD,” which does not exist on my
system.
The doc also says to use diquick.exe to test it, but diquick.exe is not
included with the XP DDK, nor is it in the DirectX 9.0c SDK. Grrrr…

Any help is greatly appreciated.

Thanks,

-Joe Fisher

-Joe


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Joe Fisher wrote:

I can’t change the HID coming from the device. So I’m trying to use
the sample in \WINDDK\2600.1106\src\wdm\hid\hidgame as a base to write
my own driver, but I’m not sure what goes where, and it doesn’t
compile. The documentation just says, “Type BUILD,” which does not
exist on my system.

Of course it does, in \winddk\2600.1106\bin\x86. If you run
\winddk\2600.1106\bin\setenv.bat, as the instructions say, your path
will be set up properly.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

WDF is Windows Driver Foundation which is an overall grouping of
technologies to make driver writing easier. KMDF is a the kernel mode
driver framework which encapsulates writing a WDM driver into a more
cohesive model. UMDF is the user mode driver framework which is new for
vista which allows you to write a driver for software and usb devices in
user mode.

KMDF can be used to write your HID minifilter but it might be more of a
pain then needed to write the minifilter since hidclass is doing all the
i/o polling for you already.

d

– I can spell, I just can’t type.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joe Fisher
Sent: Monday, May 01, 2006 8:56 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Joystick device driver

Thanks.

My XP DDK doesn’t contain the sample code you mentioned. I’m
downloading
the iso image at the link you posted earlier.

What is WDF? Is it anything like WDM?

-Joe

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Monday, May 01, 2006 11:23 AM
Subject: RE: [ntdev] Joystick device driver

In that case, you can write your own HID minidriver. Vhidmini from the
DDK is a good start. You will then have to fake out a HID descriptor
and transform all the data to HID in the minidriver before reporting it
back to HIDclass.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joe Fisher
Sent: Monday, May 01, 2006 8:19 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Joystick device driver

That’s just the problem: it doesn’t get reported as an HID device, and I

cannot change the USB descriptor coming from the hardware in the device.

So what type of driver do I need to build, then? I figured I’d have to
build some sort of filter driver, but I can’t find any information on
how to
build a driver that gets installed into Game Controllers.

Thanks,

-Joe

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Monday, May 01, 2006 10:47 AM
Subject: RE: [ntdev] Joystick device driver

I don’t think hidgame is the driver at which you want to use. First,
you
should get the latest DDK, server 2003 sp1. if you download KMDF at
http://www.microsoft.com/whdc/driver/wdf/KMDF_pkg.mspx you get it for
free
w/out waiting for shipping. Second, hidgame is a polling hid miniport
based
on the old 0x201 analog game port, not the best sample to work with.

Does your device get reported as a HID device to the OS? What part of
the
HID’ness do you want to change?

d

________________________________________
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joe Fisher
Sent: Monday, May 01, 2006 7:11 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Joystick device driver

Good morning all. I’ve been trying to get going on a driver for a USB
device
I’ve built for some time, but always got stopped by something. I’m
determined this time! I’m fairly new to device drivers, but have been
able
to write a driver that installs, and gives me debug output at the
various
stages of driver loading and unloading.

The device is a joystick-type device, and I’d like it to be installed
into
Game Controllers when it’s plugged in. Right now, the driver is a
direct-interface one, where I have to write a program to use its API. I
can
talk to the device, but I’d like it to look like a standard joystick to
Windows.

I can’t change the HID coming from the device. So I’m trying to use the
sample in \WINDDK\2600.1106\src\wdm\hid\hidgame as a base to write my
own
driver, but I’m not sure what goes where, and it doesn’t compile. The
documentation just says, “Type BUILD,” which does not exist on my
system.
The doc also says to use diquick.exe to test it, but diquick.exe is not
included with the XP DDK, nor is it in the DirectX 9.0c SDK. Grrrr…

Any help is greatly appreciated.

Thanks,

-Joe Fisher

-Joe


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

I guess I missed those instructions. I’ve already uninstalled that DDK to
put the latest one on, so I can’t go back and look. Where was this
instruction, so I can find it next time? I didn’t notice it in the folder
before.

Thanks,

-Joe

----- Original Message -----
From: “Tim Roberts”
To: “Windows System Software Devs Interest List”
Sent: Monday, May 01, 2006 12:05 PM
Subject: Re: [ntdev] Joystick device driver

> Joe Fisher wrote:
>
>>
>> I can’t change the HID coming from the device. So I’m trying to use
>> the sample in \WINDDK\2600.1106\src\wdm\hid\hidgame as a base to write
>> my own driver, but I’m not sure what goes where, and it doesn’t
>> compile. The documentation just says, “Type BUILD,” which does not
>> exist on my system.
>
>
> Of course it does, in \winddk\2600.1106\bin\x86. If you run
> \winddk\2600.1106\bin\setenv.bat, as the instructions say, your path
> will be set up properly.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

Yow. Awfully confusing to the uninitiated :slight_smile: I’ve been coding with Windows
since 3.1, and getting started in drivers is still mind-boggling.

I went to the MS site, and it said if I want to make XP drivers, I should
install the Windows Server 2003 SP1 DDK. That’s what I’m going to go with.

Thanks for the help. I’ll take a look at Vhidmini once I get things
installed here.

You mentioned “faking out” the hid descriptor. Are there any resources that
would help me figure out what I’d need to do there? I seem to be having
trouble finding info on this subject.

-Joe

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Monday, May 01, 2006 12:11 PM
Subject: RE: [ntdev] Joystick device driver

WDF is Windows Driver Foundation which is an overall grouping of
technologies to make driver writing easier. KMDF is a the kernel mode
driver framework which encapsulates writing a WDM driver into a more
cohesive model. UMDF is the user mode driver framework which is new for
vista which allows you to write a driver for software and usb devices in
user mode.

KMDF can be used to write your HID minifilter but it might be more of a
pain then needed to write the minifilter since hidclass is doing all the
i/o polling for you already.

d

– I can spell, I just can’t type.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joe Fisher
Sent: Monday, May 01, 2006 8:56 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Joystick device driver

Thanks.

My XP DDK doesn’t contain the sample code you mentioned. I’m
downloading
the iso image at the link you posted earlier.

What is WDF? Is it anything like WDM?

-Joe

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Monday, May 01, 2006 11:23 AM
Subject: RE: [ntdev] Joystick device driver

In that case, you can write your own HID minidriver. Vhidmini from the
DDK is a good start. You will then have to fake out a HID descriptor
and transform all the data to HID in the minidriver before reporting it
back to HIDclass.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joe Fisher
Sent: Monday, May 01, 2006 8:19 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Joystick device driver

That’s just the problem: it doesn’t get reported as an HID device, and I

cannot change the USB descriptor coming from the hardware in the device.

So what type of driver do I need to build, then? I figured I’d have to
build some sort of filter driver, but I can’t find any information on
how to
build a driver that gets installed into Game Controllers.

Thanks,

-Joe

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Monday, May 01, 2006 10:47 AM
Subject: RE: [ntdev] Joystick device driver

I don’t think hidgame is the driver at which you want to use. First,
you
should get the latest DDK, server 2003 sp1. if you download KMDF at
http://www.microsoft.com/whdc/driver/wdf/KMDF_pkg.mspx you get it for
free
w/out waiting for shipping. Second, hidgame is a polling hid miniport
based
on the old 0x201 analog game port, not the best sample to work with.

Does your device get reported as a HID device to the OS? What part of
the
HID’ness do you want to change?

d

________________________________________
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joe Fisher
Sent: Monday, May 01, 2006 7:11 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Joystick device driver

Good morning all. I’ve been trying to get going on a driver for a USB
device
I’ve built for some time, but always got stopped by something. I’m
determined this time! I’m fairly new to device drivers, but have been
able
to write a driver that installs, and gives me debug output at the
various
stages of driver loading and unloading.

The device is a joystick-type device, and I’d like it to be installed
into
Game Controllers when it’s plugged in. Right now, the driver is a
direct-interface one, where I have to write a program to use its API. I
can
talk to the device, but I’d like it to look like a standard joystick to
Windows.

I can’t change the HID coming from the device. So I’m trying to use the
sample in \WINDDK\2600.1106\src\wdm\hid\hidgame as a base to write my
own
driver, but I’m not sure what goes where, and it doesn’t compile. The
documentation just says, “Type BUILD,” which does not exist on my
system.
The doc also says to use diquick.exe to test it, but diquick.exe is not
included with the XP DDK, nor is it in the DirectX 9.0c SDK. Grrrr…

Any help is greatly appreciated.

Thanks,

-Joe Fisher

-Joe


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

The vhidmini sample is pretty much the definitive answer/source for
faking out a HID device.

d

– I can spell, I just can’t type.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joe Fisher
Sent: Monday, May 01, 2006 9:36 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Joystick device driver

Yow. Awfully confusing to the uninitiated :slight_smile: I’ve been coding with
Windows
since 3.1, and getting started in drivers is still mind-boggling.

I went to the MS site, and it said if I want to make XP drivers, I
should
install the Windows Server 2003 SP1 DDK. That’s what I’m going to go
with.

Thanks for the help. I’ll take a look at Vhidmini once I get things
installed here.

You mentioned “faking out” the hid descriptor. Are there any resources
that
would help me figure out what I’d need to do there? I seem to be having

trouble finding info on this subject.

-Joe

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Monday, May 01, 2006 12:11 PM
Subject: RE: [ntdev] Joystick device driver

WDF is Windows Driver Foundation which is an overall grouping of
technologies to make driver writing easier. KMDF is a the kernel mode
driver framework which encapsulates writing a WDM driver into a more
cohesive model. UMDF is the user mode driver framework which is new for
vista which allows you to write a driver for software and usb devices in
user mode.

KMDF can be used to write your HID minifilter but it might be more of a
pain then needed to write the minifilter since hidclass is doing all the
i/o polling for you already.

d

– I can spell, I just can’t type.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joe Fisher
Sent: Monday, May 01, 2006 8:56 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Joystick device driver

Thanks.

My XP DDK doesn’t contain the sample code you mentioned. I’m
downloading
the iso image at the link you posted earlier.

What is WDF? Is it anything like WDM?

-Joe

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Monday, May 01, 2006 11:23 AM
Subject: RE: [ntdev] Joystick device driver

In that case, you can write your own HID minidriver. Vhidmini from the
DDK is a good start. You will then have to fake out a HID descriptor
and transform all the data to HID in the minidriver before reporting it
back to HIDclass.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joe Fisher
Sent: Monday, May 01, 2006 8:19 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Joystick device driver

That’s just the problem: it doesn’t get reported as an HID device, and I

cannot change the USB descriptor coming from the hardware in the device.

So what type of driver do I need to build, then? I figured I’d have to
build some sort of filter driver, but I can’t find any information on
how to
build a driver that gets installed into Game Controllers.

Thanks,

-Joe

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Monday, May 01, 2006 10:47 AM
Subject: RE: [ntdev] Joystick device driver

I don’t think hidgame is the driver at which you want to use. First,
you
should get the latest DDK, server 2003 sp1. if you download KMDF at
http://www.microsoft.com/whdc/driver/wdf/KMDF_pkg.mspx you get it for
free
w/out waiting for shipping. Second, hidgame is a polling hid miniport
based
on the old 0x201 analog game port, not the best sample to work with.

Does your device get reported as a HID device to the OS? What part of
the
HID’ness do you want to change?

d

________________________________________
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joe Fisher
Sent: Monday, May 01, 2006 7:11 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Joystick device driver

Good morning all. I’ve been trying to get going on a driver for a USB
device
I’ve built for some time, but always got stopped by something. I’m
determined this time! I’m fairly new to device drivers, but have been
able
to write a driver that installs, and gives me debug output at the
various
stages of driver loading and unloading.

The device is a joystick-type device, and I’d like it to be installed
into
Game Controllers when it’s plugged in. Right now, the driver is a
direct-interface one, where I have to write a program to use its API. I
can
talk to the device, but I’d like it to look like a standard joystick to
Windows.

I can’t change the HID coming from the device. So I’m trying to use the
sample in \WINDDK\2600.1106\src\wdm\hid\hidgame as a base to write my
own
driver, but I’m not sure what goes where, and it doesn’t compile. The
documentation just says, “Type BUILD,” which does not exist on my
system.
The doc also says to use diquick.exe to test it, but diquick.exe is not
included with the XP DDK, nor is it in the DirectX 9.0c SDK. Grrrr…

Any help is greatly appreciated.

Thanks,

-Joe Fisher

-Joe


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Joe Fisher wrote:

I guess I missed those instructions. I’ve already uninstalled that
DDK to put the latest one on, so I can’t go back and look. Where was
this instruction, so I can find it next time? I didn’t notice it in
the folder before.

All of the DDKs since the dawn of antiquity have used the same
setenv.bat mechanism. The 3790 DDKs do the same thing, but you don’t
necessarily see it if you use the Start Menu shortcut to start up the
cmd session.

The “Getting Started with Windows Driver” help file (gstart.chm)
describes this.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

> What is WDF? Is it anything like WDM?

Wrapper around WDM, like MFC is around USER32.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

Ah, I suspected it was something like that.

Thanks for the push in the right direction, all. I’ve got vhidmini built,
installed and tested. Now I’ve just got to figure out what it does :smiley:

-Joe

----- Original Message -----
From: “Maxim S. Shatskih”
To: “Windows System Software Devs Interest List”
Sent: Monday, May 01, 2006 3:11 PM
Subject: Re: [ntdev] Joystick device driver

>> What is WDF? Is it anything like WDM?
>
> Wrapper around WDM, like MFC is around USER32.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

It’s a bit more than just a “wrapper”. It redefines to many aspects driver
development to be only a wrapper. Most, if not all of the pointers that
you find in WDM have become handles, and have no correlation to the old
pointer. Case in point: The device extension of a DO is fairly well
immutable. But with the handle to the DO, I can dynamically extend it
context definitions that literally extend the DE to what I need NOW in the
context in which I exist. We have found the capability of dynamically
defining multiple contexts for an IO request handle, which contains the
IRP, to be a huge benefit.

I’d call it a better foundation for driver development.

Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Monday, May 01, 2006 2:12 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Joystick device driver

What is WDF? Is it anything like WDM?

Wrapper around WDM, like MFC is around USER32.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Gee, thx :wink:

d

– I can spell, I just can’t type.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@seagate.com
Sent: Monday, May 01, 2006 1:30 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Joystick device driver

It’s a bit more than just a “wrapper”. It redefines to many aspects
driver
development to be only a wrapper. Most, if not all of the pointers that
you find in WDM have become handles, and have no correlation to the old
pointer. Case in point: The device extension of a DO is fairly well
immutable. But with the handle to the DO, I can dynamically extend it
context definitions that literally extend the DE to what I need NOW in
the
context in which I exist. We have found the capability of dynamically
defining multiple contexts for an IO request handle, which contains the
IRP, to be a huge benefit.

I’d call it a better foundation for driver development.

Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Monday, May 01, 2006 2:12 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Joystick device driver

What is WDF? Is it anything like WDM?

Wrapper around WDM, like MFC is around USER32.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer