Kmdf driver
Here are some examples of event handlers that might be implemented by a KMDF driver. For example, a USB 2. The pair of drivers usbehci. The specific, general driver pairs have a variety of names across different device technologies.
Most of the device-specific drivers have the prefix mini. The general drivers are often called port or class drivers. Here are some examples of specific, general pairs:. As more and more driver pair models were developed, it became difficult to keep track of all the different ways to write a driver. Each model has it's own interface for communication between the device-specific driver and the general driver.
The body of knowledge required to develop drivers for one device technology for example, Audio can be quite different from the body of knowledge required to develop drivers for another device technology for example, Storage.
You can double-click the solution file, KmdfHelloWorld. For Target Device Name , select the name of the computer that you configured for testing and debugging. In this exercise, we use a computer named MyTestComputer. Select OK. In this exercise, the hardware ID does not identify a real piece of hardware. It identifies an imaginary device that will be given a place in the device tree as a child of the root node.
The hardware ID is located under [Standard. On the Build menu, choose Deploy Solution. Visual Studio automatically copies the files required to install and run the driver to the target computer.
This may take a minute or two. If something goes wrong during deployment, you can check to see if the files are copied to the test computer. Verify that the. For more information about deploying drivers, see Deploying a Driver to a Test Computer. With your Hello World driver deployed to the target computer, now you'll install the driver. When you previously provisioned the target computer with Visual Studio using the automatic option, Visual Studio set up the target computer to run test signed drivers as part of the provisioning process.
Now you just need to install the driver using the DevCon tool. For example, look in the following folder:. On the target computer, install the driver by navigating to the folder containing the driver files, then running the DevCon tool.
Open a Command Prompt window as Administrator. Navigate to your folder containing the built driver. If you get an error message about devcon not being recognized, try adding the path to the devcon tool. A dialog box will appear indicating that the test driver is an unsigned driver. Select Install this driver anyway to proceed. Now that you have installed your KmdfHelloWorld driver on the target computer, you'll attach a debugger remotely from the host computer.
On the host computer, open a Command Prompt window as Administrator. For information on building the samples, see Building a Driver. ECHO Demonstrates how to use the framework's queue and request objects and automatic synchronization.
FakeModem Demonstrates a simple controllerless modem driver that sends and receives AT commands. For more information about this sample, see the Fakemodem Driver. Serial A framework-based serial driver that is based on the WDM serial sample driver. For more information about this sample, see the Serial sample. Visual Studio creates one project and a solution. You can see them in the Solution Explorer window. The solution has a driver project named KmdfDriver.
To see the driver source code, open any of the files under Source Files. In the Solution Explorer window, select and hold or right-click Solution 'KmdfDriver' 1 of 1 project , and choose Configuration Manager.
Choose a configuration and platform for the driver project. For example, choose Debug and x To build your driver, choose Build Solution from the Build menu. Microsoft Visual Studio displays build progress in the Output window. If the Output window is not visible, choose Output from the View menu. The directory includes the following files:.
Choose a configuration and platform for both the driver project and the package project. In this exercise, we choose Debug and x To build your driver and create a driver package, choose Build Solution from the Build menu. Visual Studio shows the build progress in the Output window. The folder includes:. Typically when you test and debug a driver, the debugger and driver run on separate computers. The computer that runs the debugger is called the host computer , and the computer that runs the driver is called the target computer.
The target computer is also called the test computer. For more information about debugging drivers, see Debugging Tools for Windows. So far you've used Visual Studio to build a driver on the host computer. Now you need to configure a target computer. Follow the instructions in Provision a computer for driver deployment and testing WDK
0コメント