diff options
Diffstat (limited to 'hid')
| -rw-r--r-- | hid/firefly/README.md | 89 | ||||
| -rw-r--r-- | hid/firefly/hid-firefly.yml | 12 | ||||
| -rw-r--r-- | hid/hclient/README.md | 18 | ||||
| -rw-r--r-- | hid/hclient/hid-hclient.yml | 12 | ||||
| -rw-r--r-- | hid/hidusbfx2/README.md | 14 | ||||
| -rw-r--r-- | hid/hidusbfx2/hid-hidusbfx2.yml | 12 | ||||
| -rw-r--r-- | hid/vhidmini2/README.md | 21 | ||||
| -rw-r--r-- | hid/vhidmini2/hid-vhidmini2.yml | 12 |
8 files changed, 82 insertions, 108 deletions
diff --git a/hid/firefly/README.md b/hid/firefly/README.md index cd526150..49f6b011 100644 --- a/hid/firefly/README.md +++ b/hid/firefly/README.md @@ -1,3 +1,13 @@ +--- +topic: sample +name: KMDF filter driver for a HID device +description: Illustrates using remote I/O target interfaces to open a HID collection in kernel-mode and send IOCTL requests to set and get feature reports. +languages: + - cpp +products: + - windows +--- + <!--- name: KMDF filter driver for a HID device platform: KMDF @@ -7,54 +17,47 @@ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620192 ---> +# KMDF filter driver for a HID device -KMDF filter driver for a HID device -=================================== Firefly is a KMDF-based filter driver for a HID device. Along with illustrating how to write a filter driver, this sample shows how to use remote I/O target interfaces to open a HID collection in kernel-mode and send IOCTL requests to set and get feature reports, as well as how an application can use WMI interfaces to send commands to a filter driver. -Related topics --------------- +## Related topics [Human Input Devices Design Guide](http://msdn.microsoft.com/en-us/library/windows/hardware/ff539952) [Human Input Devices Reference](http://msdn.microsoft.com/en-us/library/windows/hardware/ff539956) -Related technologies --------------------- +## Related technologies [Creating Framework-based HID Minidrivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff540774) - -Build the sample ----------------- +## Build the sample For information on how to build a driver using Microsoft Visual Studio, see [Building a Driver](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554644). When you build the sample, MSBuild.exe creates luminous.lib, firefly.sys, flicker.exe, and sauron.dll. Copy these files as well as the KMDF coinstaller (wdfcoinstallerMMmmm.dll) and the INF file (firefly.inf) to a floppy disk or a temporary directory on the target system. **Note** You can obtain redistributable framework updates by downloading the **wdfcoinstaller.msi** package from [WDK 8 Redistributable Components](http://go.microsoft.com/fwlink/p/?LinkID=226396). This package performs a silent install into the directory of your Windows Driver Kit (WDK) installation. You will see no confirmation that the installation has completed. You can verify that the redistributables have been installed on top of the WDK by ensuring there is a redist\\wdf directory under the root directory of the WDK, %ProgramFiles(x86)%\\Windows Kits\\8.0. -Installation ------------- +## Installation To install the driver: -1. Plug the Microsoft USB Optical mouse into your target machine and verify that the mouse works. The drivers for this mouse come with the operating system so the device will start working automatically when you plug in. -2. You may need to make Group Policy changes in order to replace the existing mouse driver. If you are unable to perform steps 3-9, do the following: - 1. Open **gpedit.msd**. - 2. In the Group Policy Object Editor navigation pane, open the Computer Configuration folder. Then open Administrative Templates, open System, open Device Installation, and then open Device Installation Restrictions. - 3. Enable *Prevent installation of devices not described by other policy settings*. This will prevent Windows from automatically installing the default mouse driver so that you can then install Firefly. - 4. Enable *Allow administrators to override device installation policy*. This will allow you to bypass the ""The installation of this device is forbidden by system policy" error that you may otherwise receive when you attempt to install Firefly. - 5. You may need to reboot. +1. Plug the Microsoft USB Optical mouse into your target machine and verify that the mouse works. The drivers for this mouse come with the operating system so the device will start working automatically when you plug in. +1. You may need to make Group Policy changes in order to replace the existing mouse driver. If you are unable to perform steps 3-9, do the following: + 1. Open **gpedit.msd**. + 1. In the Group Policy Object Editor navigation pane, open the Computer Configuration folder. Then open Administrative Templates, open System, open Device Installation, and then open Device Installation Restrictions. + 1. Enable *Prevent installation of devices not described by other policy settings*. This will prevent Windows from automatically installing the default mouse driver so that you can then install Firefly. + 1. Enable *Allow administrators to override device installation policy*. This will allow you to bypass the ""The installation of this device is forbidden by system policy" error that you may otherwise receive when you attempt to install Firefly. + 1. You may need to reboot. -3. Bring up the Device Manager (type **devmgmt.msc** in the Start/Run window and press enter). -4. Find the Microsoft Optical mouse under "Mice and other pointing devices" -5. Right click on the device and choose "Update Driver Software." -6. Select "Browse my computer for driver software." -7. Browse to the temporary folder you created earlier. Click Next. Click through the warning. -8. You will see "Windows has successfully updated your driver software" for the "Shiny Things Firefly Mouse" device. -9. The system will copy all the files and restart the mouse device to install the upper filter. Click Close and you are ready to run the test app. +1. Bring up the Device Manager (type **devmgmt.msc** in the Start/Run window and press enter). +1. Find the Microsoft Optical mouse under "Mice and other pointing devices" +1. Right click on the device and choose "Update Driver Software." +1. Select "Browse my computer for driver software." +1. Browse to the temporary folder you created earlier. Click Next. Click through the warning. +1. You will see "Windows has successfully updated your driver software" for the "Shiny Things Firefly Mouse" device. +1. The system will copy all the files and restart the mouse device to install the upper filter. Click Close and you are ready to run the test app. -Testing the Sample ------------------- +## Testing the Sample Copy the flicker.exe to the target machine and run it from an elevated command prompt. The usage is: @@ -66,28 +69,26 @@ Usage: Flicker \<-0 | -1 | -2\> -2 flashes light -The following description applies to Windows Media Player 12 running on Windows 7: +### Testing the DLL -**Testing the DLL** +The following description applies to Windows Media Player 12 running on Windows 7: -1. Copy the sauron.dll to the Windows Media player Visualization directory (C:\\Program Files\\Windows Media Player\\Visualizations). -2. Register the DLL with COM by calling "regsvr32 sauron.dll" in command shell. -3. Run Windows Media Player *as administrator*. -4. Click on the "Switch to Now Playing" button in the lower right of the application. -5. Right click, select Visualizations, and you will see a menu item called "Sauron." -6. Choose either Firefly Bars or Firefly Flash and play some music. -7. You will see the mouse light dancing to the tune of the music. -8. You can unregister the DLL by calling "regsvr32 -u sauron.dll". +1. Copy the sauron.dll to the Windows Media player Visualization directory (C:\\Program Files\\Windows Media Player\\Visualizations). +1. Register the DLL with COM by calling "regsvr32 sauron.dll" in command shell. +1. Run Windows Media Player *as administrator*. +1. Click on the "Switch to Now Playing" button in the lower right of the application. +1. Right click, select Visualizations, and you will see a menu item called "Sauron." +1. Choose either Firefly Bars or Firefly Flash and play some music. +1. You will see the mouse light dancing to the tune of the music. +1. You can unregister the DLL by calling "regsvr32 -u sauron.dll". -Programming Tour ----------------- +## Programming Tour The Firefly sample is installed as an upper filter driver for the Microsoft USB Intellimouse Optical. An application provided with the sample can cause the light of the optical mouse to blink by sending commands to the filter driver using the WMI interface. The sample consists of: -- Driver (firefly.sys): The Firefly driver is an upper device filter driver for the mouse driver (mouhid.sys). Firefly is a generic filter driver based on the toaster filter driver sample available in the WDK. During start device, the driver registers a WMI class (FireflyDeviceInformation). The user mode application connects to the WMI namespace (root\\wmi) and opens this class using COM interfaces. Then the application can make requests to read ("get") or change ("set") the current value of the TailLit data value from this class. In response to a set WMI request, the driver opens the HID collection using IoTarget and sends [**IOCTL\_HID\_GET\_COLLECTION\_INFORMATION**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff541092) and [**IOCTL\_HID\_GET\_COLLECTION\_DESCRIPTOR**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff541089) requests to get the preparsed data. The driver then calls [**HidP\_GetCaps**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff539715) using the preparsed data to retrieve the capabilities of the device. After getting the capabilities of the device, the driver creates a feature report to set or clear the feature that causes the light to toggle. -- Library (luminous.lib): The sources for this file are located in the \\hid\\firefly\\lib folder. You will need to build the library before using it. This library is shared by the WDM and WDF samples. All the interfaces required to access the WMI is defined in this library and exposed as CLuminous class. -- Application (flicker.exe): The sources for this file are located in the \\hid\\firefly\\app folder. You will need to build the application before using it. This application is shared by the WDM and WDF samples. The application links to luminous.lib to open the WMI interfaces and send set requests to toggle the light. -- Sauron (sauron.dll): The sources for this file are located in the \\hid\\firefly\\sauron folder. You will need to build this dll before using it. The library is shared by the WDM and WDF samples. Sauron is a Windows Media Player visualization DLL, and is based on a sample from the Windows Media Player SDK kit. By using this DLL, you can cause the mouse lights to blink to the beats of the music. - +- Driver (firefly.sys): The Firefly driver is an upper device filter driver for the mouse driver (mouhid.sys). Firefly is a generic filter driver based on the toaster filter driver sample available in the WDK. During start device, the driver registers a WMI class (FireflyDeviceInformation). The user mode application connects to the WMI namespace (root\\wmi) and opens this class using COM interfaces. Then the application can make requests to read ("get") or change ("set") the current value of the TailLit data value from this class. In response to a set WMI request, the driver opens the HID collection using IoTarget and sends [**IOCTL\_HID\_GET\_COLLECTION\_INFORMATION**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff541092) and [**IOCTL\_HID\_GET\_COLLECTION\_DESCRIPTOR**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff541089) requests to get the preparsed data. The driver then calls [**HidP\_GetCaps**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff539715) using the preparsed data to retrieve the capabilities of the device. After getting the capabilities of the device, the driver creates a feature report to set or clear the feature that causes the light to toggle. +- Library (luminous.lib): The sources for this file are located in the \\hid\\firefly\\lib folder. You will need to build the library before using it. This library is shared by the WDM and WDF samples. All the interfaces required to access the WMI is defined in this library and exposed as CLuminous class. +- Application (flicker.exe): The sources for this file are located in the \\hid\\firefly\\app folder. You will need to build the application before using it. This application is shared by the WDM and WDF samples. The application links to luminous.lib to open the WMI interfaces and send set requests to toggle the light. +- Sauron (sauron.dll): The sources for this file are located in the \\hid\\firefly\\sauron folder. You will need to build this dll before using it. The library is shared by the WDM and WDF samples. Sauron is a Windows Media Player visualization DLL, and is based on a sample from the Windows Media Player SDK kit. By using this DLL, you can cause the mouse lights to blink to the beats of the music. diff --git a/hid/firefly/hid-firefly.yml b/hid/firefly/hid-firefly.yml deleted file mode 100644 index 7a57b1cd..00000000 --- a/hid/firefly/hid-firefly.yml +++ /dev/null @@ -1,12 +0,0 @@ -### YamlMime:Sample -sample: -- name: KMDF filter driver for a HID device - description: Illustrates using remote I/O target interfaces to open a HID collection in kernel-mode and send IOCTL requests to set and get feature reports. - generateZip: true - preserveParentHierarchy: true - author: windows-driver-samples - languages: - - cpp - technologies: - - windows - vssolution: /hid/firefly/firefly.sln diff --git a/hid/hclient/README.md b/hid/hclient/README.md index 192f4f90..5d925e46 100644 --- a/hid/hclient/README.md +++ b/hid/hclient/README.md @@ -1,3 +1,13 @@ +--- +topic: sample +name: HClient sample application +description: Demonstrates how to write a user-mode client application that communicates with HID devices. +languages: + - cpp +products: + - windows +--- + <!--- name: HClient sample application platform: WDM @@ -7,18 +17,14 @@ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617730 ---> - -HClient sample application -========================== +# HClient sample application The *HClient* sample demonstrates how to write a user-mode client application that communicates with HID devices. (These are devices that conform to the HID device class specification.) You will find this sample useful if you need to develop an application that communicates with, or extracts information from, a HID device. This sample illustrates a method for detecting a connected HID, opening that device for communication, and extracting or formatting the data into, or from, device reports. -Related topics --------------- +## Related topics [Human Input Devices Design Guide](http://msdn.microsoft.com/en-us/library/windows/hardware/ff539952) [Human Input Devices Reference](http://msdn.microsoft.com/en-us/library/windows/hardware/ff539956) - diff --git a/hid/hclient/hid-hclient.yml b/hid/hclient/hid-hclient.yml deleted file mode 100644 index 50177e19..00000000 --- a/hid/hclient/hid-hclient.yml +++ /dev/null @@ -1,12 +0,0 @@ -### YamlMime:Sample -sample: -- name: HClient sample application - description: Demonstrates how to write a user-mode client application that communicates with HID devices. - generateZip: true - preserveParentHierarchy: true - author: windows-driver-samples - languages: - - cpp - technologies: - - windows - vssolution: /hid/hclient/hclient.sln diff --git a/hid/hidusbfx2/README.md b/hid/hidusbfx2/README.md index 20eb2001..f35b42b1 100644 --- a/hid/hidusbfx2/README.md +++ b/hid/hidusbfx2/README.md @@ -1,3 +1,13 @@ +--- +topic: sample +name: HIDUSBFX2 sample driver +description: Demonstrates mapping of a non-HID USB device to a HID device. +languages: + - cpp +products: + - windows +--- + <!--- name: HIDUSBFX2 sample driver platform: KMDF @@ -7,10 +17,8 @@ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620190 ---> +# HIDUSBFX2 sample driver - -HIDUSBFX2 sample driver -======================= The HIDUSBFX2 sample driver (hidusbfx2.sys) demonstrates how to map a non-HID USB device to a HID device. The sample also demonstrates how to write a HID minidriver using Windows Driver Frameworks (WDF). The minidriver is written for the [OSR USB-FX2 Learning Kit](http://www.osronline.com/hardware/OSRFX2_32.pdf). Although the device is not HID-compliant, the sample exposes it as a HID device. diff --git a/hid/hidusbfx2/hid-hidusbfx2.yml b/hid/hidusbfx2/hid-hidusbfx2.yml deleted file mode 100644 index d47eb14c..00000000 --- a/hid/hidusbfx2/hid-hidusbfx2.yml +++ /dev/null @@ -1,12 +0,0 @@ -### YamlMime:Sample -sample: -- name: HIDUSBFX2 sample driver - description: TBDemonstrates mapping of a non-HID USB device to a HID device.D - generateZip: true - preserveParentHierarchy: true - author: windows-driver-samples - languages: - - cpp - technologies: - - windows - vssolution: /hid/hidusbfx2/hidusbfx2.sln diff --git a/hid/vhidmini2/README.md b/hid/vhidmini2/README.md index bd6ea894..beed5a28 100644 --- a/hid/vhidmini2/README.md +++ b/hid/vhidmini2/README.md @@ -1,3 +1,13 @@ +--- +topic: sample +name: HID Minidriver Sample (UMDF version 2) +description: Demonstrates how to write a HID minidriver using User-Mode Driver Framework (UMDF). +languages: + - cpp +products: + - windows +--- + <!--- name: HID Minidriver Sample (UMDF version 2) platform: UMDF2 @@ -7,15 +17,13 @@ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617731 ---> -HID Minidriver Sample (UMDF version 2) -====================================== -The *HID minidriver* sample demonstrates how to write a HID minidriver using User-Mode Driver Framework (UMDF). +# HID Minidriver Sample (UMDF version 2) -The sample demonstrates how to communicate with an HID minidriver from an HID client using a custom-feature item in order to control certain features of the HID minidriver. This is needed since other conventional modes for communicating with a driver, like custom IOCTL or WMI, do not work with the HID minidriver. The sample also is useful in testing the correctness of a HID report descriptor without using a physical device. +The *HID minidriver* sample demonstrates how to write a HID minidriver using User-Mode Driver Framework (UMDF). +The sample demonstrates how to communicate with an HID minidriver from an HID client using a custom-feature item in order to control certain features of the HID minidriver. This is needed since other conventional modes for communicating with a driver, like custom IOCTL or WMI, do not work with the HID minidriver. The sample also is useful in testing the correctness of a HID report descriptor without using a physical device. -Related topics --------------- +## Related topics [Creating UMDF-based HID Minidrivers](http://msdn.microsoft.com/en-us/library/windows/hardware/hh439579) @@ -24,4 +32,3 @@ Related topics [Human Input Devices Reference](http://msdn.microsoft.com/en-us/library/windows/hardware/ff539956) [UMDF HID Minidriver IOCTLs](http://msdn.microsoft.com/en-us/library/windows/hardware/hh463977) - diff --git a/hid/vhidmini2/hid-vhidmini2.yml b/hid/vhidmini2/hid-vhidmini2.yml deleted file mode 100644 index b85ad8aa..00000000 --- a/hid/vhidmini2/hid-vhidmini2.yml +++ /dev/null @@ -1,12 +0,0 @@ -### YamlMime:Sample -sample: -- name: HID Minidriver Sample (UMDF version 2) - description: Demonstrates how to write a HID minidriver using User-Mode Driver Framework (UMDF). - generateZip: true - preserveParentHierarchy: true - author: windows-driver-samples - languages: - - cpp - technologies: - - windows - vssolution: /hid/vhidmini2/vhidmini2.sln |
